Skip to content

Commit

Permalink
feat:(isMobilePhone): add mobile number prefix 162 and 165 to zh-CN l…
Browse files Browse the repository at this point in the history
…ocale (#1695)
  • Loading branch information
laulujan authored Jul 16, 2021
1 parent 2595554 commit b82d4e1
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -114,7 +114,7 @@ const phones = {
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?1([3456789][0-9]|4[579]|6[67]|7[01235678]|9[012356789])[0-9]{8}$/,
'zh-CN': /^((\+|00)86)?1([3456789][0-9]|4[579]|6[2567]|7[01235678]|9[012356789])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
};
/* eslint-enable max-len */
Expand Down
3 changes: 3 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -5987,6 +5987,9 @@ describe('Validators', () => {
'16565600001',
'+8617269427292',
'008617269427292',
'16238234822',
'008616238234822',
'+8616238234822',
],
invalid: [
'12345',
Expand Down

0 comments on commit b82d4e1

Please sign in to comment.