Skip to content

Commit e08e79a

Browse files
authored
fix(sMobilePhone): regexp for Vietnamese phone number (#1689)
1 parent cff8a2e commit e08e79a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const phones = {
113113
'tr-TR': /^(\+?90|0)?5\d{9}$/,
114114
'uk-UA': /^(\+?38|8)?0\d{9}$/,
115115
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
116-
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
116+
'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
117117
'zh-CN': /^((\+|00)86)?1([3456789][0-9]|4[579]|6[2567]|7[01235678]|9[012356789])[0-9]{8}$/,
118118
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
119119
};

test/validators.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6748,6 +6748,8 @@ describe('Validators', () => {
67486748
'0892405867',
67496749
'+84888696413',
67506750
'0878123456',
6751+
'84781234567',
6752+
'0553803765',
67516753
],
67526754
invalid: [
67536755
'12345',
@@ -6759,6 +6761,8 @@ describe('Validators', () => {
67596761
'+841698765432',
67606762
'841626543219',
67616763
'0533803765',
6764+
'08712345678',
6765+
'+0321234567',
67626766
],
67636767
},
67646768
{

0 commit comments

Comments
 (0)