Skip to content
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

Merged
merged 6 commits into from
Oct 24, 2017
Merged

Add Estonian locale (et-EE) to isMobilePhone validator #737

merged 6 commits into from
Oct 24, 2017

Conversation

Tarpsvo
Copy link
Contributor

@Tarpsvo Tarpsvo commented Oct 18, 2017

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

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
@chriso
Copy link
Collaborator

chriso commented Oct 24, 2017

Thanks. Can you update the README and add a test case?

'+51234567',
'+372 539 57 4',
'+372 900 1234',
'12345678'
Copy link
Collaborator

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.

Copy link
Contributor Author

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}$/,
Copy link
Collaborator

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.

@chriso
Copy link
Collaborator

chriso commented Oct 24, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants