Skip to content

Commit

Permalink
fix(isIBAN): narrow regex for VG
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Nov 18, 2023
1 parent b958bd7 commit 5f0757e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isIBAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ibanRegexThroughCountryCode = {
TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,
UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,
VA: /^(VA[0-9]{2})\d{18}$/,
VG: /^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,
VG: /^(VG[0-9]{2})[A-Z]{4}\d{16}$/,
XK: /^(XK[0-9]{2})\d{16}$/,
};

Expand Down
2 changes: 2 additions & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5259,13 +5259,15 @@ describe('Validators', () => {
'IR200170000000339545727003',
'MZ97123412341234123412341',
'MA64011519000001205000534921',
'VG96VPVG0000012345678901',
],
invalid: [
'XX22YYY1234567890123',
'FR14 2004 1010 0505 0001 3',
'FR7630006000011234567890189@',
'FR7630006000011234567890189😅',
'FR763000600001123456!!🤨7890189@',
'VG46H07Y0223060094359858',
],
});
test({
Expand Down

0 comments on commit 5f0757e

Please sign in to comment.