Skip to content

Commit 1b85829

Browse files
kyled7Kyle Dinh
andauthored
feat(isMobileNumber): add support new telco numbers for VN locale (#1575)
* Support new VN mobile phone 087 (https://didong.itelecom.vn/) * Add test for new telco number Co-authored-by: Kyle Dinh <[email protected]>
1 parent 8831db3 commit 1b85829

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib/isMobilePhone.js

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

test/validators.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6391,6 +6391,7 @@ describe('Validators', () => {
63916391
'0883805866',
63926392
'0892405867',
63936393
'+84888696413',
6394+
'0878123456',
63946395
],
63956396
invalid: [
63966397
'12345',

0 commit comments

Comments
 (0)