Skip to content

Commit 678e55b

Browse files
authored
Merge pull request #1952 from avkvak/ka-ge-phone-regex-fix
fix phone numner validation for ka-GE locale
2 parents c8c247c + b415ade commit 678e55b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const phones = {
101101
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
102102
'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,
103103
'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
104-
'ka-GE': /^(\+?995)?(5|79)\d{7}$/,
104+
'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/,
105105
'kk-KZ': /^(\+?7|8)?7\d{9}$/,
106106
'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
107107
'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,

test/validators.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7247,18 +7247,19 @@ describe('Validators', () => {
72477247
{
72487248
locale: 'ka-GE',
72497249
valid: [
7250-
'+99550001111',
7251-
'+99551535213',
7250+
'+995500011111',
7251+
'+995515352134',
72527252
'+995798526662',
72537253
'798526662',
7254-
'50001111',
7254+
'500011119',
72557255
'798526662',
72567256
'+995799766525',
72577257
],
72587258
invalid: [
7259-
'+995500011118',
7259+
'+99550001111',
72607260
'+9957997665250',
7261-
'+995999766525',
7261+
'+9959997665251',
7262+
'+995780011111',
72627263
'20000000000',
72637264
'68129485729',
72647265
'6589394827',

0 commit comments

Comments
 (0)