Skip to content

Commit d88c7b6

Browse files
committed
fix(Honduras_enhancement): added the correct regex for phone numbers in Honduras and added valid test cases for the change.
1 parent cfcf911 commit d88c7b6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const phones = {
6969
'es-CR': /^(\+506)?[2-8]\d{7}$/,
7070
'es-CU': /^(\+53|0053)?5\d{7}/,
7171
'es-DO': /^(\+?1)?8[024]9\d{7}$/,
72-
'es-HN': /^(\+?504)?[9|8]\d{7}$/,
72+
'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/,
7373
'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
7474
'es-ES': /^(\+?34)?[6|7]\d{8}$/,
7575
'es-PE': /^(\+?51)?9\d{8}$/,

test/validators.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7623,6 +7623,10 @@ describe('Validators', () => {
76237623
'+50489234567',
76247624
'+50488987896',
76257625
'+50497567389',
7626+
'+50427367389',
7627+
'+50422357389',
7628+
'+50431257389',
7629+
'+50430157389',
76267630
],
76277631
invalid: [
76287632
'12345',

0 commit comments

Comments
 (0)