Skip to content

Commit bb2947d

Browse files
Rafael BrensRafael Brens
Rafael Brens
authored and
Rafael Brens
committed
fix: linting and +1 test
1 parent a030852 commit bb2947d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/isMobilePhone.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const phones = {
3939
'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,
4040
'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,
4141
'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,
42-
'en-DM': /^(\+?1|0)767(?:2(?:[2-4689]|7[0-4])|31[5-7]|4(?:[37]|6[0-4])|50[1-9]|642[0-4]|76[89])\d{4}$/,
42+
'en-DM': /^(\+?1)?767\d{7}$/,
4343
'en-GB': /^(\+?44|0)7[1-9]\d{8}$/,
4444
'en-GG': /^(\+?44|0)1481\d{6}$/,
4545
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,

test/validators.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10743,7 +10743,7 @@ describe('Validators', () => {
1074310743
'+17672505678',
1074410744
'17677625678',
1074510745
'7673155678',
10746-
'7674375678'
10746+
'7674375678',
1074710747
],
1074810748
invalid: [
1074910749
'+17612345678',
@@ -10756,9 +10756,9 @@ describe('Validators', () => {
1075610756
'This should fail',
1075710757
'+176723456',
1075810758
'76723456',
10759-
'7672'
10760-
]
10761-
}
10759+
'7672',
10760+
],
10761+
},
1076210762
];
1076310763

1076410764
let allValid = [];

0 commit comments

Comments
 (0)