Comments (5)
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.
What initialisation options are you using by the way?
from intl-tel-input.
So this is the demo site, homescreen - showing the example number in national form - I'm guessing this looks ok to you?
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?
from intl-tel-input.
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.
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)
- Country Dropdown Hidden Mobile HOT 4
- Search country input on mobile browsers is not tapable HOT 6
- React version of intl-tel-input throws an error when unmounted HOT 2
- Format as you type nor working HOT 1
- Bug: `nationalMode` and `showSelectedDialCode` together HOT 6
- Initialization options: "i18n.countryListAriaLabel" has no effect HOT 2
- Search field not appearing within drop down HOT 4
- Uncaught Error: No country data for 'undefined HOT 23
- Send Country data to Hubspot HOT 1
- Not the correct mask for the country France HOT 2
- Showing invalid number even if the number is valid HOT 9
- initialCountry does not work if you send the country code in the upper register HOT 3
- Issue with setNumber() HOT 2
- Please make esbuild a devDependency again HOT 2
- Validation of empty phone field (mandatory phone input * ) HOT 1
- isValidNumber() passing on invalid number HOT 14
- Accessibility: Dropdown not reading country options HOT 3
- Valid Turkey number starting with some prefixes etc.0561 returns invalid number HOT 3
- Wrong validation with letters HOT 2
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 intl-tel-input.