Closed sbungert-mms closed 1 year ago
E164 numbers need to have at most 15 numbers and no special chars except a leading +
Can you provide a reference to a reputable source?
how can I validate that there are not too many digits? Is there some API method of doing this?
Currently there's no restriction on such phone numbers' length.
but for E164 I don't need to know about the country.
That's true.
@catamphetamine I have the same request. Please check my sandbox here https://codesandbox.io/s/libphonenumber-js-e-164-iyhlrx For reference on E.164, check https://www.itu.int/rec/T-REC-E.164-201011-I/en
I hope this can be fixed.
@hanselsen
I have the same request.
What request?
@catamphetamine to have the isValidPhoneNumber take the 15 digit number into consideration. That would be great.
Is there any function like isValid that will validate a phone number as being compliant for E164?
E164 numbers need to have at most 15 numbers and no special chars except a leading +, how can I validate that there are not too many digits? Is there some API method of doing this? Or should manually check if there are not to many digits?
validatePhoneNumberLength seems to require a country code and makes sure the phonenumber is within the bounds of a country specific number, but for E164 I don't need to know about the country. I just want to check that there are not more than 15 digits