angularphone-numberlibphonenumberintl-tel-input

Number 0 not removed after country code intl-tel-input


I'm using the intl-tel-input library for phone number validation.

One thing I notice is that I can put a 0 after the country code for an international number like this:

libphonenumber

enter image description here

As you can see, the phone number is valid and the 0 is automatically stripped with the international format.

I tried to send myself a message with the 0 + the code area and I received the message.

I would like to know for sure that is the user enter his phone number with the 0 with the code area in a form, that we will be able to send him a phone message anyway and that the number won't be invalid. Or do you think I need to code a method to remove the 0 automatically ?

Hope I was clear enough and thanks for your help !


Solution

  • Having the same question, I stumbled over your post. We have issues were calling the number with the '0' in between does not work, even if it is recognized as valid by libphonenumber.

    I just did an additional test with SMS. Also here, the SMS with '0' in the number could not be sent.

    Example:

    So to answer your question: No, you cannot be sure that numbers with the '0' in between will work in all cases. We now use the E164 format after the number was recognized as valid.