GithubHelp home page GithubHelp logo

Comments (5)

catamphetamine avatar catamphetamine commented on June 23, 2024 2

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.

catamphetamine avatar catamphetamine commented on June 23, 2024 2

Fixed in the new version

from libphonenumber-js.

onlineautoparts avatar onlineautoparts commented on June 23, 2024

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.

https://github.com/googlei18n/libphonenumber/blob/3894ee185c277ee5d0c9e81993030aaaff4a8d50/resources/PhoneNumberMetadata.xml#L1848

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.

catamphetamine avatar catamphetamine commented on June 23, 2024

Well, we can make it this way:

  1. You create an issue in Google's repo describing that nationalPrefixOptionalWhenFormatting should be true for either this exact phone number format or for Australia as a whole.
  2. We see how they clarify the situation and whether they recognize this bug.
  3. Depends on 1. and 2.

from libphonenumber-js.

catamphetamine avatar catamphetamine commented on June 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.