From 3087572e3af7afb7b49544c8ffb0cac301d04109 Mon Sep 17 00:00:00 2001 From: Munif Tanjim Date: Mon, 7 Oct 2019 00:28:04 +0600 Subject: [PATCH] fix(isMobilePhone): add new prefix for bn-BD (#1132) --- src/lib/isMobilePhone.js | 2 +- test/validators.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index fe780cd70..cc4c4f7ab 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -14,7 +14,7 @@ const phones = { 'ar-TN': /^(\+?216)?[2459]\d{7}$/, 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, - 'bn-BD': /^(\+?880|0)1[1356789][0-9]{8}$/, + 'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/, 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, 'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/, diff --git a/test/validators.js b/test/validators.js index 13368fb4f..09715fb3e 100644 --- a/test/validators.js +++ b/test/validators.js @@ -3862,13 +3862,13 @@ describe('Validators', () => { '01717112029', '8801898765432', '+8801312345678', + '01494676946', ], invalid: [ '', '0174626346', '017943563469', '18001234567', - '01494676946', '0131234567', ], },