Closed davidarny closed 8 months ago
Question is why user is able to type 10 digits?
This library doesn't provide any "typing" capabilities
@catamphetamine yeah, I'm using a masking library which relies on validatePhoneNumberLength
function to prevent typing too long phone numbers. Sorry for confusion :)
So what's your question then?
validatePhoneNumberLength
should return TOO_LONG
for such phone number I suppose: +380 93 111-11111
. Valid Ukrainian phone number has only 9 digits after +380
@DavidArutiunian See the "bug reporting" section of the readme. There it explains how to check any assumptions using Google's demo.
@catamphetamine here they're
And from your demo:
@DavidArutiunian According to the links you've posted, Google doesn't return TOO_LONG
for those numbers so libphonenumber-js
behavior is correct.
@DavidArutiunian And when it's too long then it returns TOO_LONG
:
https://libphonenumber.appspot.com/phonenumberparser?number=%2B38093111111111
Ok, I see. Thanks for clarification! Closing this issue.
A valid Ukrainian phone number includes 9 digits after
+380
country code. I'm validating phone number withlibphonenumber-js
and getting invalid results when user types 10 digits. Question is why user is able to type 10 digits?I didn't found any info that Ukrainian phone number can be 10 symbols long (after a country code)