Skip to content

Commit 0e5d5d4

Browse files
mfkrauseprofnandaa
authored andcommitted
feat(isMobilePhone): add Guyana en-GY locale
[chore] fixed merge conflicts in #1784 feat: (isMobilePhone) Add Guyana mobile phone validation Fix linter errors
1 parent f7ff349 commit 0e5d5d4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/lib/isMobilePhone.js

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const phones = {
3636
'en-GB': /^(\+?44|0)7\d{9}$/,
3737
'en-GG': /^(\+?44|0)1481\d{6}$/,
3838
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,
39+
'en-GY': /^(\+592|0)6\d{6}$/,
3940
'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
4041
'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
4142
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,

test/validators.js

+16
Original file line numberDiff line numberDiff line change
@@ -6523,6 +6523,22 @@ describe('Validators', () => {
65236523
'+233292345671',
65246524
],
65256525
},
6526+
{
6527+
locale: 'en-GY',
6528+
valid: [
6529+
'+5926121234',
6530+
'06121234',
6531+
'06726381',
6532+
'+5926726381',
6533+
],
6534+
invalid: [
6535+
'5926121234',
6536+
'6121234',
6537+
'+592 6121234',
6538+
'05926121234',
6539+
'+592-6121234',
6540+
],
6541+
},
65266542
{
65276543
locale: 'en-HK',
65286544
valid: [

0 commit comments

Comments
 (0)