From 7e41fbabf26424de3ef3961e032938e860d00238 Mon Sep 17 00:00:00 2001 From: Deividas Date: Fri, 17 Jan 2025 01:16:33 +0200 Subject: [PATCH] fix(isIBAN): adjusting Palestine IBAN regex to include alphanumeric characters instead of only numbers --- src/lib/isIBAN.js | 2 +- test/validators.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/isIBAN.js b/src/lib/isIBAN.js index a24ff0de3..94ac67ca5 100644 --- a/src/lib/isIBAN.js +++ b/src/lib/isIBAN.js @@ -67,7 +67,7 @@ const ibanRegexThroughCountryCode = { NO: /^(NO[0-9]{2})\d{11}$/, PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, PL: /^(PL[0-9]{2})\d{24}$/, - PS: /^(PS[0-9]{2})[A-Z]{4}\d{21}$/, + PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, PT: /^(PT[0-9]{2})\d{21}$/, QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, diff --git a/test/validators.test.js b/test/validators.test.js index 6ea52063d..d0908ad12 100644 --- a/test/validators.test.js +++ b/test/validators.test.js @@ -5859,6 +5859,7 @@ describe('Validators', () => { 'DZ580002100001113000000570', 'IE29AIBK93115212345678', 'PS92PALS000000000400123456702', + 'PS92PALS00000000040012345670O', ], invalid: [ 'XX22YYY1234567890123',