Skip to content

Commit

Permalink
feat(isMobilePhone): add Guyana en-GY locale
Browse files Browse the repository at this point in the history
[chore] fixed merge conflicts in #1784

feat: (isMobilePhone) Add Guyana mobile phone validation

Fix linter errors
  • Loading branch information
mfkrause authored and profnandaa committed Oct 31, 2021
1 parent d286a3a commit 248d7c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const phones = {
'en-GB': /^(\+?44|0)7\d{9}$/,
'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-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}$/,
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
Expand Down
16 changes: 16 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6523,6 +6523,22 @@ describe('Validators', () => {
'+233292345671',
],
},
{
locale: 'en-GY',
valid: [
'+5926121234',
'06121234',
'06726381',
'+5926726381',
],
invalid: [
'5926121234',
'6121234',
'+592 6121234',
'05926121234',
'+592-6121234',
],
},
{
locale: 'en-HK',
valid: [
Expand Down

0 comments on commit 248d7c0

Please sign in to comment.