Closed Milooz closed 2 weeks ago
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.
Thank you for your answer. I check libphonenumber
I just test on their demo page Phone Number Parser Demo with this number (+66 2636 1950) and it works.
I'm using this link to load your library intel-tel-input but it's not working.
However, you seem to be using the correct version of their library. I'm a little lost
The same is the case with Hungarian phone numbers (sorry for not opening a separate error ticket, but this seems to be the same error). In Hungary, you can also have 8- and 9-digit phone numbers (Budapest landline numbers are 8-digit, e.g. +36-1-234-5678). I get the same error for these (the Phone Number Parser Demo page also indicates these phone numbers as valid).
@Milooz @ZoTyA1975 what exactly is the problem here? Is it that you're using a validation method and it's failing? Which validation method are you using?
On this page: https://intl-tel-input.com/examples/validation-practical.html, enter this phone number (select Hungary): 12345678 Then on this page: https://htmlpreview.github.io/?https://github.com/google/libphonenumber/blob/master/javascript/i18n/phonenumbers/demo-compiled.html enter this number: +3612345678 (same number as on the previous page) This phone number is a valid Hungarian phone number.
I think I found the solution to my problem. I have to use this: https://intl-tel-input.com/examples/validation.html
On https://intl-tel-input.com/examples/validation-practical.html if you read the line of text above the input, it says:
NOTE: by default, isValidNumber only returns true for mobile numbers. See validationNumberType option for more information.
I'm guessing this number (+3612345678) is not a mobile number?
If you want to accept all numbers instead of just mobile numbers, you can set validationNumberType=null
On https://intl-tel-input.com/examples/validation-practical.html if you read the line of text above the input, it says:
NOTE: by default, isValidNumber only returns true for mobile numbers. See validationNumberType option for more information.
I'm guessing this number (+3612345678) is not a mobile number?
If you want to accept all numbers instead of just mobile numbers, you can set validationNumberType=null
Oh thank you for your answer!!! It was exactly this problem! Sorry for the inconvenience
(at some point I will try to make the demo page more clear around this issue as it is a bit confusing)
Plugin version
e.g. v24.6.0 (please try latest version)
Steps to reproduce
Expected behaviour
In thailand it's possible to have phone numbers with 8 or 9 numbers
Actual behaviour
You can only add with 9 numbers Example : https://www.hilton.com/en/hotels/bkkhitw-millennium-hilton-bangkok/, only 8 numbers