Skip to content

Commit

Permalink
fix(isIBAN): adjusting Ireland and Palestine IBAN regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarasz57 committed Jan 16, 2025
1 parent 86911d8 commit 8f47a32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/isIBAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ibanRegexThroughCountryCode = {
GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,
HR: /^(HR[0-9]{2})\d{17}$/,
HU: /^(HU[0-9]{2})\d{24}$/,
IE: /^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,
IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/,
IL: /^(IL[0-9]{2})\d{19}$/,
IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/,
Expand Down Expand Up @@ -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-Z0-9]{4}\d{21}$/,
PS: /^(PS[0-9]{2})[A-Z]{4}\d{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}$/,
Expand Down
4 changes: 4 additions & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5857,6 +5857,8 @@ describe('Validators', () => {
'MA64011519000001205000534921',
'VG96VPVG0000012345678901',
'DZ580002100001113000000570',
'IE29AIBK93115212345678',
'PS92PALS000000000400123456702',
],
invalid: [
'XX22YYY1234567890123',
Expand All @@ -5865,6 +5867,8 @@ describe('Validators', () => {
'FR7630006000011234567890189😅',
'FR763000600001123456!!🤨7890189@',
'VG46H07Y0223060094359858',
'IE95TE8270900834048660',
'PS072435171802145240705922007',
],
});
test({
Expand Down

0 comments on commit 8f47a32

Please sign in to comment.