Comments (5)
I had a look at your case and Google's demo indeed says that this is a valid number.
I personally think Google's algorythm is wrong and if 0
is really not required then you may create an issue in their repo to add nationalPrefixOptionalWhenFormatting="true"
either to the format itself to to the whole AU country.
https://github.com/googlei18n/libphonenumber/blob/3894ee185c277ee5d0c9e81993030aaaff4a8d50/resources/PhoneNumberMetadata.xml#L1725-L1732
from libphonenumber-js.
Fixed in the new version
from libphonenumber-js.
Thank you for having a look at this. I believe the issue stills falls under this repository because even in their metadata they show "412345678" as an example for a mobile number.
Do you know of a way I can manually make it work for Australia? Almost 90% of our users will be Australian.
from libphonenumber-js.
Well, we can make it this way:
- You create an issue in Google's repo describing that
nationalPrefixOptionalWhenFormatting
should betrue
for either this exact phone number format or for Australia as a whole. - We see how they clarify the situation and whether they recognize this bug.
- Depends on 1. and 2.
from libphonenumber-js.
Yeah, I saw it.
Either they add that parameter to the metadata or I add that parameter manually as a workaround specially for Australia.
from libphonenumber-js.
Related Issues (20)
- isValid() and isValidPhoneNumber() return real phone number is invalid HOT 2
- Error [ERR_REQUIRE_ESM] on parsePhoneNumberFromString HOT 4
- parsePhoneNumberWithError() return isValid() === 'false' but not throw an error HOT 3
- Some HK mobile numbers (9291****) are not yet supported in this library HOT 1
- Belgium phone number are valid even if they can't be parsed for national display HOT 1
- When using AsYouType with US Country code, if number starts with 1 it formats incorrectly. HOT 1
- country code duplication for some countries HOT 2
- ParsePhoneNumber mistakes the two first digits as the country code HOT 1
- When editing a formatted number the cursor moves to the end HOT 1
- Get countryCode, countryName, countryFlag object HOT 4
- isValidPhoneNumber function return wrong result HOT 1
- +15575001171 number not validated as valid phone number when it is valid by Google's libphonenumber HOT 5
- isValidPhoneNumber and parsePhoneNumber validate the number incorrectly HOT 6
- Missing area code 861 HOT 1
- ts(1479) error in index.d.cts HOT 3
- Unable to delete characters if there is a parenthesis HOT 1
- Any property returns area code? HOT 3
- Different Results |ย Real Life vs Demo HOT 2
- validatePhoneNumberLength does not return TOO_LONG for invalid Ukrainian phone number HOT 9
- Some North American countries receive incorrect National Format when removing digits
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libphonenumber-js.