Skip to content

Commit

Permalink
feat(isMobilePhone): add Kiribati en-KI locale
Browse files Browse the repository at this point in the history
[chore] squashed from #1820

Clean up validator and add trailing comma
  • Loading branch information
c-tanner authored and profnandaa committed Oct 31, 2021
1 parent ed60123 commit 8627e48
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 @@ -41,6 +41,7 @@ const phones = {
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,
'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,
'en-MU': /^(\+?230|0)?\d{8}$/,
'en-NA': /^(\+?264|0)(6|8)\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 @@ -6608,6 +6608,22 @@ describe('Validators', () => {
'+254800723845',
],
},
{
locale: 'en-KI',
valid: [
'+68673140000',
'68673059999',
'+68663000000',
'68663019999',
],
invalid: [
'+68653000000',
'68664019999',
'+68619019999',
'686123456789',
'+686733445',
],
},
{
locale: 'en-MT',
valid: [
Expand Down

0 comments on commit 8627e48

Please sign in to comment.