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

Edit Chinese MobilePhone Verifying regular. #801

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

mlinquan
Copy link
Contributor

@mlinquan mlinquan commented Mar 9, 2018

I re - submitted one, you can merge it to master branch. Thank you very much!

@@ -70,7 +70,7 @@ var phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,
'zh-CN': /^(\+?0?86\-?)?1[3456789]\d{9}$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
Copy link
Member

Choose a reason for hiding this comment

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

Did you just change to a more specific validator here, more like a subset of the previous one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This rule is more stringent, thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Strict verification is not necessary. China's phone numbers are increasing very fast, and new numbers will be added every once in a while. The use of strict verification will be difficult to maintain.

@chriso
Copy link
Collaborator

chriso commented May 3, 2018

This appears to be more strict than the existing version. Can you provide a source for the pattern?

@chriso
Copy link
Collaborator

chriso commented Jul 31, 2018

I'm going to merge this one, as it appears to fix one of the reported bugs: #866

@chriso chriso merged commit 08140b4 into validatorjs:master Jul 31, 2018
@mlinquan mlinquan deleted the test-pr branch August 2, 2018 06:59
@mlinquan
Copy link
Contributor Author

mlinquan commented Aug 2, 2018

You made a wise choice. Thank you!

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.

4 participants