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

Update '"zh-CN"' #1178

Closed
wants to merge 3 commits into from
Closed

Update '"zh-CN"' #1178

wants to merge 3 commits into from

Conversation

liuzhaowei55
Copy link

The prefix '+' and '00' of 'zh-CN' are not required

The prefix '+' and '00' of 'zh-CN' are not required
@@ -83,7 +83,7 @@ const phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-6|89]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[0135678]|9[189])[0-9]{8}$/,
'zh-CN': /^((\+|00)?86)?1([358][0-9]|4[579]|6[67]|7[0135678]|9[189])[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.

I think this will also need some tests added.

Cc. @tux-tn and @profnandaa.

@ezkemboi
Copy link
Member

@liuzhaowei55, how does this PR differ with this one #1174?

@liuzhaowei55
Copy link
Author

@liuzhaowei55, how does this PR differ with this one #1174?

His PR is good, starting with "+86172" number is mobile number.

https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9B%BD%E5%86%85%E5%9C%B0%E7%A7%BB%E5%8A%A8%E7%BB%88%E7%AB%AF%E9%80%9A%E8%AE%AF%E5%8F%B7%E6%AE%B5

@ezkemboi
Copy link
Member

So, does this mean that you have done what has already been done?

Cc. @profnandaa and @tux-tn.

@liuzhaowei55
Copy link
Author

e.g:
+8615200000000
008615200000000
8615200000000
I thing the prefix + and 00 are not required, I will change my code and add tests.

@profnandaa profnandaa added the 🧹 needs-update For PRs that need to be updated before landing label Oct 25, 2019
…into validatorjs-master

# Conflicts:
#	src/lib/isMobilePhone.js
#	test/validators.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 needs-update For PRs that need to be updated before landing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants