Skip to content

Commit

Permalink
fix(isMobilePhone): handle new networks codes in ghana
Browse files Browse the repository at this point in the history
  • Loading branch information
ankorGH committed Apr 1, 2021
1 parent 63b6162 commit 509fd18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const phones = {
'en-AU': /^(\+?61|0)4\d{8}$/,
'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)\d{7}$/,
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,
'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
2 changes: 2 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -5874,6 +5874,8 @@ describe('Validators', () => {
'+233562345671',
'+233232345671',
'+233282345671',
'+233592349493',
'0550298219',
],
invalid: [
'082123',
Expand Down

0 comments on commit 509fd18

Please sign in to comment.