Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some numbers cannot be validated correctly #320

Open
Ahmed-Salama96 opened this issue Oct 28, 2024 · 7 comments
Open

Some numbers cannot be validated correctly #320

Ahmed-Salama96 opened this issue Oct 28, 2024 · 7 comments

Comments

@Ahmed-Salama96
Copy link

Screenshot 2024-10-28 at 10 45 06 AM in the attached screenshot i've two numbers one for +20 and other for +55. I'm trying to put the country code twice in the number to make it wrong, but the number +55 considered as true in the gem, and this making an issue on our twilio

"Twilio::REST::RestError: [HTTP 400] 21614 : Unable to create record 'To' number: +555592150XXXX, is not a valid mobile number"

@abhinav-1050
Copy link

abhinav-1050 commented Nov 5, 2024

@Ahmed-Salama96 Did you find any solution?

@Ahmed-Salama96
Copy link
Author

Nope @abhinav-1050

@abhinav-1050
Copy link

abhinav-1050 commented Nov 6, 2024

Try using this in your initializer file.

Phonelib.strict_double_prefix_check = true

@Ahmed-Salama96
Copy link
Author

Tried that but still same

@Ahmed-Salama96
Copy link
Author

even if i try
Phonelib.valid_for_country?('+5555921509051', 'BR')
it returns true

@daddyz
Copy link
Owner

daddyz commented Nov 20, 2024

This number is also parsed as valid in original libphonenumber. You can check it here and open an issue for them. Gem's data is based on it.

@Ahmed-Salama96
Copy link
Author

Thank you @daddyz ,
i opened an issue there
https://issuetracker.google.com/issues/379888479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants