Skip to content

Commit

Permalink
Merge branch 'master' into mrp/isMobilePhone-ro-MD
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin authored Nov 14, 2024
2 parents aadb817 + f54599c commit 7e74d49
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const phones = {
'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,
'en-GB': /^(\+?44|0)7[1-9]\d{8}$/,
'en-GG': /^(\+?44|0)1481\d{6}$/,
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,
'en-GY': /^(\+592|0)6\d{6}$/,
'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/isPostalCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const patterns = {
BA: /^([7-8]\d{4}$)/,
BE: fourDigit,
BG: fourDigit,
BR: /^\d{5}-\d{3}$/,
BR: /^\d{5}-?\d{3}$/,
BY: /^2[1-4]\d{4}$/,
CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,
CH: fourDigit,
Expand Down
5 changes: 5 additions & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8053,6 +8053,7 @@ describe('Validators', () => {
'0502345671',
'0242345671',
'0542345671',
'0532345671',
'0272345671',
'0572345671',
'0262345671',
Expand All @@ -8063,6 +8064,7 @@ describe('Validators', () => {
'+233502345671',
'+233242345671',
'+233542345671',
'+233532345671',
'+233272345671',
'+233572345671',
'+233262345671',
Expand Down Expand Up @@ -12743,6 +12745,9 @@ describe('Validators', () => {
'39100-000',
'22040-020',
'39400-152',
'39100000',
'22040020',
'39400152',
],
invalid: [
'79800A12',
Expand Down

0 comments on commit 7e74d49

Please # to comment.