Skip to content

Commit

Permalink
fix(isMobilePhone): update Sri Lanka locale (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhavi96 authored Oct 30, 2021
1 parent 050a424 commit 5ed7db1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const phones = {
'pt-AO': /^(\+244)\d{9}$/,
'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,
'ru-RU': /^(\+?7|8)?9\d{9}$/,
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|5|6|7|8)( |-)?\d)\d{6}$/,
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
'sq-AL': /^(\+355|0)6[789]\d{6}$/,
Expand Down
3 changes: 1 addition & 2 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6841,14 +6841,13 @@ describe('Validators', () => {
'0786642116',
'078 7642116',
'078-7642116',

'0749994567',
],
invalid: [
'9912349956789',
'12345',
'1678123456',
'0731234567',
'0749994567',
'0797878674',
],
},
Expand Down

0 comments on commit 5ed7db1

Please sign in to comment.