Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix merge conflicts #1851

Merged
merged 11 commits into from
Oct 31, 2021
Prev Previous commit
Next Next commit
feat(isMobilePhone): add Kiribati en-KI locale
[chore] squashed from #1820

Clean up validator and add trailing comma
  • Loading branch information
c-tanner authored and profnandaa committed Oct 31, 2021
commit 8627e4815bcbbab7474ce23ae1c2599b3dba5462
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