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

isMobilePhone: add Chile locale and additional prefix for KE locale #1035

Merged
merged 2 commits into from May 24, 2019

Conversation

ezkemboi
Copy link
Member

@ezkemboi ezkemboi commented May 24, 2019

This PR solves the issue raised under issue 1030 by @profnandaa.

More reference on the addition of prefix for KE locale: https://ca.go.ke/new-series-of-mobile-number-introduced-in-kenya/

This changes also reflect the changes made on add Chile mobile number in isMobilePhone. The issue is raised by on issue 1033

@ezkemboi ezkemboi changed the title isMobilePhone: add additional prefix for KE locale Add additional prefix for KE locale && add Chile mobile Phone (isMobilePhone) May 24, 2019
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -34,7 +34,7 @@ var phones = {
'en-HK': /^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/,
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
'en-KE': /^(\+?254|0)?[7]\d{8}$/,
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. And also fixes a previous subtle bug that made 0/254 prefix optional when it should not be.

@profnandaa profnandaa changed the title Add additional prefix for KE locale && add Chile mobile Phone (isMobilePhone) isMobilePhone: add Chile locale and additional prefix for KE locale May 24, 2019
@profnandaa profnandaa added the ready-to-land For PRs that are reviewed and ready to be landed label May 24, 2019
@profnandaa profnandaa merged commit eb0bbba into validatorjs:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants