-
Notifications
You must be signed in to change notification settings - Fork 129
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
international parsing fails on 8 digit indian numbers #169
Comments
In rails, this behavior can be fixed by adding |
@chiefjuss number 9112345678 is not valid by google's regex. Phonelib.parse('+9112345678').valid? # => false Since number is not valid, for countries with option to have double country prefix, library tries to add additional country prefix and reparse, and in case it's valid, the new number will be returned. So your suggestion is not good. You need to open an issue in original google lib. You can check that it fails here |
similar to issue 168, 8 digit indian phone numbers do not parse properly, whereas 10 digit indian phone numbers parse correctly. Please note that the country code is prepended twice on 8 digit indian phone numbers,
`2.3.6 :021 > Phonelib.parse('911234567890').international
=> "+91 1234 567 890"
2.3.6 :022 > Phonelib.parse('9112345678').international
=> "+91 91123 45678" `
The text was updated successfully, but these errors were encountered: