Giter VIP home page Giter VIP logo

Comments (5)

jackocnr avatar jackocnr commented on May 25, 2024

We use libphonenumber for formatting, validation and generating placeholder numbers - if your issue relates to one of these things, please check their test site first and if you see the problem there please file an issue with them instead.

If it's working correctly in libphonenumber, the next step is to check that we're using the latest version of libphonenumber in the plugin - check the version history here. If we need to upgrade, it only takes 5 minutes to do this yourself and submit a Pull Request - instructions here: Updating to a new version of libphonenumber.

from intl-tel-input.

jackocnr avatar jackocnr commented on May 25, 2024

What initialisation options are you using by the way?

from intl-tel-input.

jackocnr avatar jackocnr commented on May 25, 2024

So this is the demo site, homescreen - showing the example number in national form - I'm guessing this looks ok to you?
Screenshot 2024-01-25 at 12 27 24

And here is the demo site, on the showSelectedDialCode demo - is this the bit you think is wrong? Is it because you consider the +90 displayed next to the flag to be part of the typed phone number?
Screenshot 2024-01-25 at 12 36 53

from intl-tel-input.

leecollings-sb avatar leecollings-sb commented on May 25, 2024

I just thought I'd show that the output from the test URL you provided initially @jackocnr, would imply that the leading zero is dropped. Just to let you know, I haven't checked the libphonenumber version being the most up to date.

****Parsing Result:****
{"country_code":90,"national_number":5012345678,"raw_input":"0501 234 56 78","country_code_source":20}

****Validation Results:****
Result from isPossibleNumber(): true
Result from isValidNumber(): true
Result from isValidNumberForRegion(): true
Phone Number region: TR
Result from getNumberType(): MOBILE

****Formatting Results:**** 
E164 format: +905012345678
Original format: 0501 234 56 78
National format: 0501 234 56 78
International format: +90 501 234 56 78
Out-of-country format from US: 011 90 501 234 56 78
Out-of-country format from Switzerland: 00 90 501 234 56 78
Format for mobile dialing (calling from US): +90 501 234 56 78
Format for national dialing with preferred carrier code and empty fallback carrier code: 0501 234 56 78

****AsYouTypeFormatter Results****
Char entered: 0 Output: 0
Char entered: 5 Output: 05
Char entered: 0 Output: 050
Char entered: 1 Output: 0501
Char entered:   Output: 0501 
Char entered: 2 Output: 0501 2
Char entered: 3 Output: 0501 23
Char entered: 4 Output: 0501 234
Char entered:   Output: 0501 234 
Char entered: 5 Output: 0501 234 5
Char entered: 6 Output: 0501 234 56
Char entered:   Output: 0501 234 56 
Char entered: 7 Output: 0501 234 56 7
Char entered: 8 Output: 0501 234 56 78

from intl-tel-input.

jackocnr avatar jackocnr commented on May 25, 2024

Thanks @leecollings-sb

@bariskrdrl I can only assume you're using showSelectedDialCode and you're thinking of the displayed dial code as being part of the number. In this case, if you want the placeholder to be in international format, then you can set nationalMode to false.

I'll close this for now, but let me know if you're still having any issues.

from intl-tel-input.

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.