phonelib icon indicating copy to clipboard operation
phonelib copied to clipboard

Missing geocoding data for country calling code

Open sheena-gygax opened this issue 7 years ago • 2 comments

Phone numbers with area code '227' are not valid:

    phone = "227-220-1449"
    Phonelib.parse(phone).valid?

returns false

sheena-gygax avatar Feb 11 '19 21:02 sheena-gygax

I tried updating data as suggested in https://github.com/daddyz/phonelib/issues/150, but still says the number is not valid:

2.4.1 :003 > Phonelib.valid? "2272383291"
 => false
2.4.1 :004 > Phonelib.valid_for_country? "2272383291", "US"
 => false

sheena-gygax avatar Feb 14 '19 23:02 sheena-gygax

@sheena-gygax Hi, original google libphonenumber does not recognize 227. Their regex says 22[03-589] which does not include 227. You can check it here and open an issue for them. Once they will implement this change, I will be able to update the data and phone will be validated as valid.

daddyz avatar Mar 06 '19 05:03 daddyz