Closed Adam-Langley closed 3 years ago
I have the same problem with austrian numbers... were you able to solve this or is this still an issue ?
This seems to work as expected as long as you select Mobile
and National
for this number:
Before formatting:
After formatting (sync):
Clicking parse after also
confirms it's correct:
When using the synchronous formatting it's based on the example numbers supplied from libphonenumber, and uses a mask from those numbers. That's why it's important to specify the mobile/fixe line
and national/international
settings correctly so it uses the right mask to format it.
[CountryWithPhoneCode(
countryName: New Zealand,
regionCode: NZ,
phoneCode: 64,
exampleNumberMobileNational: 021 123 4567,
exampleNumberFixedLineNational: 03-234 5678,
phoneMaskMobileNational: 000 000 0000,
phoneMaskFixedLineNational: 00-000 0000,
exampleNumberMobileInternational: +64 21 123 4567,
exampleNumberFixedLineInternational: +64 3-234 5678,
phoneMaskMobileInternational: +00 00 000 0000,
phoneMaskFixedLineInternational: +00 0-000 0000)
]
@emmaxCreative I moved your comment back to your issue to keep it on track with the Austrian number discussion 👍
Formatting the number "+642101234567" using "formatNumberSync" produces the output "+64 21 012 3456"
It should not drop any digits from the end. The expected output is
"+64 21 012 34567"
Testing using libphonenumber.appspot produces the correct output:
https://libphonenumber.appspot.com/phonenumberparser?number=%2B642101234567