Skip to content

Commit

Permalink
Merge pull request #801 from mlinquan/test-pr
Browse files Browse the repository at this point in the history
Edit Chinese MobilePhone Verifying regular.
  • Loading branch information
chriso authored Jul 31, 2018
2 parents 4082b06 + d2bf2a5 commit 08140b4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,
'zh-CN': /^(\+?0?86\-?)?1[3456789]\d{9}$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
};
/* eslint-enable max-len */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,
'zh-CN': /^(\+?0?86\-?)?1[3456789]\d{9}$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
};
/* eslint-enable max-len */
Expand Down
21 changes: 15 additions & 6 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3451,17 +3451,26 @@ describe('Validators', () => {
'15323456787',
'13523333233',
'13898728332',
'+086-13238234822',
'08613487234567',
'8617823492338',
'86-17823492338',
'+8613238234822',
'+8613487234567',
'+8617823492338',
'+8617823492338',
'16637108167',
'86-16637108167',
'+086-16637108167',
'+8616637108167',
'+8616637108167',
'008618812341234',
'008618812341234',
'+8619912341234',
'+8619812341234',
],
invalid: [
'12345',
'',
'+08613811211114',
'+008613811211114',
'08613811211114',
'0086-13811211114',
'0086-138-1121-1114',
'Vml2YW11cyBmZXJtZtesting123',
'010-38238383',
],
Expand Down
2 changes: 1 addition & 1 deletion validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ var phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,
'zh-CN': /^(\+?0?86\-?)?1[3456789]\d{9}$/,
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
};
/* eslint-enable max-len */
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit 08140b4

Please sign in to comment.