Skip to content

Commit

Permalink
fix(isMobilePhone): update bn-BD validation (#1032)
Browse files Browse the repository at this point in the history
  • Loading branch information
alouini333 authored and chriso committed May 23, 2019
1 parent daaf1f7 commit 5830e66
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var 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': /\+?(88)?0?1[356789][0-9]{8}\b/,
'bn-BD': /^(\+?880|0)1[1356789][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}$/,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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': /\+?(88)?0?1[356789][0-9]{8}\b/,
'bn-BD': /^(\+?880|0)1[1356789][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}$/,
Expand Down
3 changes: 3 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3555,13 +3555,16 @@ describe('Validators', () => {
'01399098893',
'8801671163269',
'01717112029',
'8801898765432',
'+8801312345678',
],
invalid: [
'',
'0174626346',
'017943563469',
'18001234567',
'01494676946',
'0131234567',
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ var 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': /\+?(88)?0?1[356789][0-9]{8}\b/,
'bn-BD': /^(\+?880|0)1[1356789][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}$/,
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit 5830e66

Please sign in to comment.