Skip to content

Commit

Permalink
fix(sMobilePhone): regexp for Vietnamese phone number (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisrivas committed Jul 16, 2021
1 parent cff8a2e commit e08e79a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Expand Up @@ -113,7 +113,7 @@ const phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'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})$/,
'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
'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}$/,
};
Expand Down
4 changes: 4 additions & 0 deletions test/validators.js
Expand Up @@ -6748,6 +6748,8 @@ describe('Validators', () => {
'0892405867',
'+84888696413',
'0878123456',
'84781234567',
'0553803765',
],
invalid: [
'12345',
Expand All @@ -6759,6 +6761,8 @@ describe('Validators', () => {
'+841698765432',
'841626543219',
'0533803765',
'08712345678',
'+0321234567',
],
},
{
Expand Down

0 comments on commit e08e79a

Please sign in to comment.