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

German phone numbers are not formatted correctly #13

Open
AmkSk opened this issue Jun 21, 2021 · 1 comment
Open

German phone numbers are not formatted correctly #13

AmkSk opened this issue Jun 21, 2021 · 1 comment

Comments

@AmkSk
Copy link

AmkSk commented Jun 21, 2021

The library formats the following number +491726123456 incorrectly:
Expected: +49 172 6123456
Actual: +49 1726 123456

I tried to use Google's libphonenumber library and it formats the phone number as expected

@alishari
Copy link
Contributor

I checked the issue on the source code. The problem is in this line:

phoneUtil.getExampleNumberForType(

It returns a sample phone number with the given country code, but Germany has different formats based on the national phone number.

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

2 participants