Skip to content

Commit

Permalink
Merge pull request #1952 from avkvak/ka-ge-phone-regex-fix
Browse files Browse the repository at this point in the history
fix phone numner validation for ka-GE locale
  • Loading branch information
rubiin authored Jul 19, 2022
2 parents c8c247c + b415ade commit 678e55b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const phones = {
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,
'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
'ka-GE': /^(\+?995)?(5|79)\d{7}$/,
'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/,
'kk-KZ': /^(\+?7|8)?7\d{9}$/,
'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
Expand Down
11 changes: 6 additions & 5 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -7247,18 +7247,19 @@ describe('Validators', () => {
{
locale: 'ka-GE',
valid: [
'+99550001111',
'+99551535213',
'+995500011111',
'+995515352134',
'+995798526662',
'798526662',
'50001111',
'500011119',
'798526662',
'+995799766525',
],
invalid: [
'+995500011118',
'+99550001111',
'+9957997665250',
'+995999766525',
'+9959997665251',
'+995780011111',
'20000000000',
'68129485729',
'6589394827',
Expand Down

0 comments on commit 678e55b

Please sign in to comment.