Skip to content

Commit

Permalink
feat(isMobilePhone): update zh-CN validation (#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
heathcliff-hu authored Jun 13, 2020
1 parent 5f6f2a4 commit 2a4043d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,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([3568][0-9]|4[579]|6[67]|7[01235678]|9[189])[0-9]{8}$/,
'zh-CN': /^((\+|00)86)?1([3568][0-9]|4[579]|6[67]|7[01235678]|9[012356789])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
};
/* eslint-enable max-len */
Expand Down
5 changes: 5 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -5127,6 +5127,11 @@ describe('Validators', () => {
'008618812341234',
'+8619912341234',
'+8619812341234',
'+8619712341234',
'+8619612341234',
'+8619512341234',
'+8619312341234',
'+8619212341234',
'+8619112341234',
'17269427292',
'16565600001',
Expand Down

0 comments on commit 2a4043d

Please sign in to comment.