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 are formatted incorrectly #185

Open
arpadlukacs opened this issue Feb 10, 2020 · 3 comments
Open

Some numbers are formatted incorrectly #185

arpadlukacs opened this issue Feb 10, 2020 · 3 comments
Labels
missing validation data data for some prefix/country is missing in the souce

Comments

@arpadlukacs
Copy link

Phonelib.parse("5141111111").national
=> "(041) 111111"

I would expect the result to be (514) 111-1111

@arpadlukacs arpadlukacs changed the title Some numbers are not formatted incorrectly Some numbers are formatted incorrectly Feb 10, 2020
@daddyz
Copy link
Owner

daddyz commented Feb 11, 2020

@arpadlukacs This number is parsed as Peru, is this a correct country?

@arpadlukacs
Copy link
Author

arpadlukacs commented Feb 11, 2020

No, the country is US, so the full number is +1 (514) 111-1111
For the record, when I add the "US" parameter to the parse method, it returns the number as it is, but without any formatting:

Phonelib.parse("514-111-1111","US").national
=> "5141111111"

@daddyz
Copy link
Owner

daddyz commented Oct 13, 2020

This number is not parsed as valid number (even on original libphonenumber), so it doesn't get formatted.

@daddyz daddyz added the missing validation data data for some prefix/country is missing in the souce label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing validation data data for some prefix/country is missing in the souce
Projects
None yet
Development

No branches or pull requests

2 participants