Skip to content

Commit

Permalink
fix(isMobilePhone): fix for zh-CN (#1312)
Browse files Browse the repository at this point in the history
fixes #1303
  • Loading branch information
parasg1999 authored May 26, 2020
1 parent aa31434 commit 1cc189e
Show file tree
Hide file tree
Showing 2 changed files with 2 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 @@ -90,7 +90,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[01235678]|9[189])[0-9]{8}$/,
'zh-CN': /^((\+|00)86)?1([3568][0-9]|4[579]|6[67]|7[01235678]|9[189])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
};
/* eslint-enable max-len */
Expand Down
1 change: 1 addition & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -4955,6 +4955,7 @@ describe('Validators', () => {
'+8619812341234',
'+8619112341234',
'17269427292',
'16565600001',
'+8617269427292',
'008617269427292',
],
Expand Down

0 comments on commit 1cc189e

Please sign in to comment.