Skip to content

Commit

Permalink
fix(isIBAN): add support for EG and SV (#1394)
Browse files Browse the repository at this point in the history
  • Loading branch information
heanzyzabala authored Jul 27, 2020
1 parent f67a57f commit bb7b211
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/isIBAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const ibanRegexThroughCountryCode = {
DK: /^(DK[0-9]{2})\d{14}$/,
DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/,
EE: /^(EE[0-9]{2})\d{16}$/,
EG: /^(EG[0-9]{2})\d{25}$/,
ES: /^(ES[0-9]{2})\d{20}$/,
FI: /^(FI[0-9]{2})\d{14}$/,
FO: /^(FO[0-9]{2})\d{14}$/,
Expand Down Expand Up @@ -74,6 +75,7 @@ const ibanRegexThroughCountryCode = {
SI: /^(SI[0-9]{2})\d{15}$/,
SK: /^(SK[0-9]{2})\d{20}$/,
SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,
TL: /^(TL[0-9]{2})\d{19}$/,
TN: /^(TN[0-9]{2})\d{20}$/,
TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,
Expand Down
5 changes: 5 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,11 @@ describe('Validators', () => {
test({
validator: 'isIBAN',
valid: [
'SC52BAHL01031234567890123456USD',
'LC14BOSL123456789012345678901234',
'MT31MALT01100000000000000000123',
'SV43ACAT00000000000000123123',
'EG800002000156789012345180002',
'BE71 0961 2345 6769',
'FR76 3000 6000 0112 3456 7890 189',
'DE91 1000 0000 0123 4567 89',
Expand Down

0 comments on commit bb7b211

Please sign in to comment.