-
-
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
Add Estonian locale (et-EE) to isMobilePhone validator #737
Conversation
The validator checks for: a) If the country code is +372 (+ and whole country code optional) b) Number starts with 5, 81, 82, 83 or 84 c) The number contains 7 to 8 numbers
Thanks. Can you update the README and add a test case? |
test/validators.js
Outdated
'+51234567', | ||
'+372 539 57 4', | ||
'+372 900 1234', | ||
'12345678' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a trailing comma here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh god, this is the last time I use the GitHub web editor. Keep making mistakes with it. Thank you!
@@ -38,6 +38,7 @@ var phones = { | |||
'en-ZA': /^(\+?27|0)\d{9}$/, | |||
'en-ZM': /^(\+?26)?09[567]\d{7}$/, | |||
'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, | |||
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to update src/lib/isMobilePhone.js
too.
Thanks! |
The validator checks for:
a) If the country code is +372 (+ and whole country code optional)
b) Number starts with 5, 81, 82, 83 or 84
c) The number contains 7 to 8 numbers