Skip to content

Commit

Permalink
fix(isMobilePhone): update zh-CN validation (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
shianqi authored and chriso committed May 23, 2019
1 parent 41a940f commit fd7a793
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -71,7 +71,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([689]))|(7([0|6-9]))|(8([1-5]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[0135678]|9[189])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
};
/* eslint-enable max-len */
Expand Down
2 changes: 2 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3640,10 +3640,12 @@ describe('Validators', () => {
'16637108167',
'+8616637108167',
'+8616637108167',
'+8616712341234',
'008618812341234',
'008618812341234',
'+8619912341234',
'+8619812341234',
'+8619112341234',
],
invalid: [
'12345',
Expand Down

0 comments on commit fd7a793

Please sign in to comment.