Skip to content

Commit a1e8476

Browse files
authored
fix(isIBAN): adjusting Ireland and Palestine IBAN regex (#2518)
1 parent 86911d8 commit a1e8476

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/lib/isIBAN.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ibanRegexThroughCountryCode = {
3939
GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,
4040
HR: /^(HR[0-9]{2})\d{17}$/,
4141
HU: /^(HU[0-9]{2})\d{24}$/,
42-
IE: /^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,
42+
IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/,
4343
IL: /^(IL[0-9]{2})\d{19}$/,
4444
IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
4545
IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/,
@@ -67,7 +67,7 @@ const ibanRegexThroughCountryCode = {
6767
NO: /^(NO[0-9]{2})\d{11}$/,
6868
PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,
6969
PL: /^(PL[0-9]{2})\d{24}$/,
70-
PS: /^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,
70+
PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,
7171
PT: /^(PT[0-9]{2})\d{21}$/,
7272
QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,
7373
RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,

test/validators.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5857,6 +5857,9 @@ describe('Validators', () => {
58575857
'MA64011519000001205000534921',
58585858
'VG96VPVG0000012345678901',
58595859
'DZ580002100001113000000570',
5860+
'IE29AIBK93115212345678',
5861+
'PS92PALS000000000400123456702',
5862+
'PS92PALS00000000040012345670O',
58605863
],
58615864
invalid: [
58625865
'XX22YYY1234567890123',
@@ -5865,6 +5868,8 @@ describe('Validators', () => {
58655868
'FR7630006000011234567890189😅',
58665869
'FR763000600001123456!!🤨7890189@',
58675870
'VG46H07Y0223060094359858',
5871+
'IE95TE8270900834048660',
5872+
'PS072435171802145240705922007',
58685873
],
58695874
});
58705875
test({

0 commit comments

Comments
 (0)