From 0519f9e1f53951af5d9846fa64a4461a61105962 Mon Sep 17 00:00:00 2001 From: Kyle Dinh Date: Thu, 7 Jan 2021 14:11:03 +0700 Subject: [PATCH 1/2] Support new VN mobile phone 087 (https://didong.itelecom.vn/) --- src/lib/isMobilePhone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index c34d45dfb..68a19922e 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -110,7 +110,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-6|89]))|(9([0-9])))([0-9]{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([3568][0-9]|4[579]|6[67]|7[01235678]|9[012356789])[0-9]{8}$/, 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/, }; From e6e8ba62a02775d6c47816e524018c4558c86476 Mon Sep 17 00:00:00 2001 From: Kyle Dinh Date: Tue, 12 Jan 2021 09:48:28 +0700 Subject: [PATCH 2/2] Add test for new telco number --- test/validators.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/validators.js b/test/validators.js index baeca631a..b9899b626 100644 --- a/test/validators.js +++ b/test/validators.js @@ -6391,6 +6391,7 @@ describe('Validators', () => { '0883805866', '0892405867', '+84888696413', + '0878123456', ], invalid: [ '12345',