daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.06k stars 130 forks source link

Vietnam valid phone numbers with prefix same as a country code, seem to fail vaildation. #171

Closed bndeepti closed 5 years ago

bndeepti commented 5 years ago

We have encountered a issue as follows,

number1 = "902962207" Phonelib.parse(number1) returns "+84902962207"

number2 = "844666531" Phonelib.parse(number2) returns the same "+844666531"

number2 is a valid Vietnam phone number. Vietnam updated phone prefixes last year. By this, 84 is a valid prefix (without country code).

This does not seem to work with latest version of phonelib. Any resolutions ?

daddyz commented 5 years ago

@bndeepti fixed in v0.6.37