Skip to content

Commit 15afc77

Browse files
Madhavi96profnandaa
authored andcommitted
fix(isMobilePhone): update Sri Lanka locale (#1785)
1 parent 6e485a3 commit 15afc77

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const phones = {
106106
'pt-AO': /^(\+244)\d{9}$/,
107107
'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,
108108
'ru-RU': /^(\+?7|8)?9\d{9}$/,
109-
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|5|6|7|8)( |-)?\d)\d{6}$/,
109+
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
110110
'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
111111
'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
112112
'sq-AL': /^(\+355|0)6[789]\d{6}$/,

test/validators.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6841,14 +6841,13 @@ describe('Validators', () => {
68416841
'0786642116',
68426842
'078 7642116',
68436843
'078-7642116',
6844-
6844+
'0749994567',
68456845
],
68466846
invalid: [
68476847
'9912349956789',
68486848
'12345',
68496849
'1678123456',
68506850
'0731234567',
6851-
'0749994567',
68526851
'0797878674',
68536852
],
68546853
},

0 commit comments

Comments
 (0)