Skip to content

Commit cb91971

Browse files
authoredMar 7, 2023
fix(isMobilePhone): fixed es-CU matching all numbers that start with 5 longer than 8 digits (#2197)
Co-authored-by: Kevin Laframboise <kevin@wisesystems.com> fixes #2196
1 parent 43803c0 commit cb91971

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎src/lib/isMobilePhone.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const phones = {
7676
'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,
7777
'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
7878
'es-CR': /^(\+506)?[2-8]\d{7}$/,
79-
'es-CU': /^(\+53|0053)?5\d{7}/,
79+
'es-CU': /^(\+53|0053)?5\d{7}$/,
8080
'es-DO': /^(\+?1)?8[024]9\d{7}$/,
8181
'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/,
8282
'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,

‎test/validators.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -8296,6 +8296,7 @@ describe('Validators', () => {
82968296
'',
82978297
'abc',
82988298
'+535123457',
8299+
'56043029304',
82998300
],
83008301
},
83018302
{

0 commit comments

Comments
 (0)
Please sign in to comment.