You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The en-US locale of isMobilePhone erroneously accepts some foreign numbers, if they are the correct length including the country code. +6425864074 is a (fake) New Zealand mobile phone number, and not a valid NANPA number, but isMobilePhone('+6425864074', 'en-US') returns true.
It appears that the regex treats the + and 1 at the beginning as separately optional, but the 1 is not optional for this locale after a +.
The text was updated successfully, but these errors were encountered:
The
en-US
locale of isMobilePhone erroneously accepts some foreign numbers, if they are the correct length including the country code.+6425864074
is a (fake) New Zealand mobile phone number, and not a valid NANPA number, butisMobilePhone('+6425864074', 'en-US')
returns true.It appears that the regex treats the
+
and1
at the beginning as separately optional, but the1
is not optional for this locale after a+
.The text was updated successfully, but these errors were encountered: