Skip to content

Commit

Permalink
feat(isMobileNumber): add support new telco numbers for VN locale (#1575
Browse files Browse the repository at this point in the history
)

* Support new VN mobile phone 087 (https://didong.itelecom.vn/)

* Add test for new telco number

Co-authored-by: Kyle Dinh <[email protected]>
  • Loading branch information
kyled7 and Kyle Dinh authored Jan 14, 2021
1 parent 8831db3 commit 1b85829
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}$/,
};
Expand Down
1 change: 1 addition & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6391,6 +6391,7 @@ describe('Validators', () => {
'0883805866',
'0892405867',
'+84888696413',
'0878123456',
],
invalid: [
'12345',
Expand Down

0 comments on commit 1b85829

Please sign in to comment.