From d88c7b61173b61f7ac176cb3a9386e4dde63158f Mon Sep 17 00:00:00 2001 From: ademyan Date: Sat, 11 Jun 2022 12:21:56 -0700 Subject: [PATCH 1/3] fix(Honduras_enhancement): added the correct regex for phone numbers in Honduras and added valid test cases for the change. --- src/lib/isMobilePhone.js | 2 +- test/validators.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index e19184ba9..df5e301b9 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -69,7 +69,7 @@ const phones = { 'es-CR': /^(\+506)?[2-8]\d{7}$/, 'es-CU': /^(\+53|0053)?5\d{7}/, 'es-DO': /^(\+?1)?8[024]9\d{7}$/, - 'es-HN': /^(\+?504)?[9|8]\d{7}$/, + 'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/, 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, 'es-ES': /^(\+?34)?[6|7]\d{8}$/, 'es-PE': /^(\+?51)?9\d{8}$/, diff --git a/test/validators.js b/test/validators.js index 16fb6b89b..c522c3a0f 100644 --- a/test/validators.js +++ b/test/validators.js @@ -7623,6 +7623,10 @@ describe('Validators', () => { '+50489234567', '+50488987896', '+50497567389', + '+50427367389', + '+50422357389', + '+50431257389', + '+50430157389', ], invalid: [ '12345', From 2280ff10c4cf8b7c80ea17980a85ec785cd86cf3 Mon Sep 17 00:00:00 2001 From: ademyan Date: Mon, 13 Jun 2022 08:19:33 -0700 Subject: [PATCH 2/3] Revert "fix(Honduras_enhancement): added the correct regex for phone numbers in Honduras and added valid test cases for the change." This reverts commit d88c7b61 --- src/lib/isMobilePhone.js | 2 +- test/validators.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index df5e301b9..e19184ba9 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -69,7 +69,7 @@ const phones = { 'es-CR': /^(\+506)?[2-8]\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-HN': /^(\+?504)?[9|8]\d{7}$/, 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, 'es-ES': /^(\+?34)?[6|7]\d{8}$/, 'es-PE': /^(\+?51)?9\d{8}$/, diff --git a/test/validators.js b/test/validators.js index c522c3a0f..16fb6b89b 100644 --- a/test/validators.js +++ b/test/validators.js @@ -7623,10 +7623,6 @@ describe('Validators', () => { '+50489234567', '+50488987896', '+50497567389', - '+50427367389', - '+50422357389', - '+50431257389', - '+50430157389', ], invalid: [ '12345', From d50c8607af7a0b0dbefa2205893f9639ffa85550 Mon Sep 17 00:00:00 2001 From: ademyan Date: Mon, 13 Jun 2022 08:24:43 -0700 Subject: [PATCH 3/3] "fix(Honduras_enhancement): added the correct regex for phone numbers in Honduras and added valid test cases for the change." --- src/lib/isMobilePhone.js | 2 +- test/validators.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index e19184ba9..df5e301b9 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -69,7 +69,7 @@ const phones = { 'es-CR': /^(\+506)?[2-8]\d{7}$/, 'es-CU': /^(\+53|0053)?5\d{7}/, 'es-DO': /^(\+?1)?8[024]9\d{7}$/, - 'es-HN': /^(\+?504)?[9|8]\d{7}$/, + 'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/, 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, 'es-ES': /^(\+?34)?[6|7]\d{8}$/, 'es-PE': /^(\+?51)?9\d{8}$/, diff --git a/test/validators.js b/test/validators.js index 16fb6b89b..c522c3a0f 100644 --- a/test/validators.js +++ b/test/validators.js @@ -7623,6 +7623,10 @@ describe('Validators', () => { '+50489234567', '+50488987896', '+50497567389', + '+50427367389', + '+50422357389', + '+50431257389', + '+50430157389', ], invalid: [ '12345',