Skip to content

Commit

Permalink
fix(isMobilePhone): fixed es-CU matching all numbers that start with …
Browse files Browse the repository at this point in the history
…5 longer than 8 digits (#2197)

Co-authored-by: Kevin Laframboise <kevin@wisesystems.com>

fixes #2196
  • Loading branch information
klaframboise committed Mar 7, 2023
1 parent 43803c0 commit cb91971
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const phones = {
'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,
'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
'es-CR': /^(\+506)?[2-8]\d{7}$/,
'es-CU': /^(\+53|0053)?5\d{7}/,
'es-CU': /^(\+53|0053)?5\d{7}$/,
'es-DO': /^(\+?1)?8[024]9\d{7}$/,
'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/,
'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
Expand Down
1 change: 1 addition & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8296,6 +8296,7 @@ describe('Validators', () => {
'',
'abc',
'+535123457',
'56043029304',
],
},
{
Expand Down

0 comments on commit cb91971

Please sign in to comment.