-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to validate country code is always on mobile phone? #741
Labels
Comments
That's not currently possible AFAIK. You might be able to check whether the string starts with a |
Yeah I have done it that way for now :P Feels like tho this should belong to this library since it is doing the validation :) |
profnandaa
added a commit
to profnandaa/validator.js
that referenced
this issue
Dec 25, 2017
This commit adds an option on isMobilePhone to allow for strict strict checking of mobile phone numbers, i.e. must start with '+<country-code>' fixes validatorjs#741
profnandaa
added a commit
to profnandaa/validator.js
that referenced
this issue
Dec 25, 2017
This commit adds an option on isMobilePhone to allow for strict strict checking of mobile phone numbers, i.e. must start with '+<country-code>' fixes validatorjs#741
andela-anandaa
pushed a commit
to profnandaa/validator.js
that referenced
this issue
Jan 30, 2018
This commit adds an option on isMobilePhone to allow for strict strict checking of mobile phone numbers, i.e. must start with '+<country-code>' fixes validatorjs#741
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment looks like the country codes are optional on
isMobilePhone
. How can I validate that the phone numbers I validate always have country code with them?The text was updated successfully, but these errors were encountered: