Skip to content

Commit 5ed7db1

Browse files
authored
fix(isMobilePhone): update Sri Lanka locale (#1785)
1 parent 050a424 commit 5ed7db1

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
@@ -105,7 +105,7 @@ const phones = {
105105
'pt-AO': /^(\+244)\d{9}$/,
106106
'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,
107107
'ru-RU': /^(\+?7|8)?9\d{9}$/,
108-
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|5|6|7|8)( |-)?\d)\d{6}$/,
108+
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
109109
'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
110110
'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
111111
'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)