Some Nigerian's phone number return invalid (whereas google libphonenumber does not)
Closed this issue · 3 comments
guillaumedenece commented
Hi,
Phonelib.valid?('2349049974092')
returns false
Whereas google phonelib indicates that this phone number is valid.
Find the test on google phonelib here
I can confirm that this phone number is valid since I tried to send it an SMS and it has been delivered.
Thank's a lot in advance
CamiloGarciaLaRotta commented
bumping as it's the same with Singapore numbers:
irb(main):017:0> Phonelib.valid_for_country? "+6589343220", "SG"
=> false
Google Phonelib says it's valid
CamiloGarciaLaRotta commented
digging a bit into the source code, I see that both Singapore and Nigeria are part of the gem's data. So the issue is at the gem level 👀 I appreciate any pointers I can get if you'd like a fix PR.
irb(main):018:0> phone_data[:country_names]["SG"]
=> "Singapore"
irb(main):019:0> phone_data[:country_names]["NG"]
=> "Nigeria"
daddyz commented
@CamiloGarciaLaRotta in version 0.6.46 returns true
for both numbers