Skip to content

Commit 2440c39

Browse files
lroudgelroudge
and
lroudge
authoredJun 26, 2023
feat(isIBAN): add Morocco (MA) IBAN format (#2025)
* feat(isIBAN): add Morocco (MA) IBAN format * test(isIBAN): add moroccan IBAN example to test --------- Co-authored-by: lroudge <laura@hikoala.co>
1 parent 4c25f26 commit 2440c39

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
 

‎src/lib/isIBAN.js

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const ibanRegexThroughCountryCode = {
5353
LT: /^(LT[0-9]{2})\d{16}$/,
5454
LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,
5555
LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,
56+
MA: /^(MA[0-9]{26})$/,
5657
MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,
5758
MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/,
5859
ME: /^(ME[0-9]{2})\d{18}$/,

‎test/validators.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -5246,6 +5246,7 @@ describe('Validators', () => {
52465246
'LB92000700000000123123456123',
52475247
'IR200170000000339545727003',
52485248
'MZ97123412341234123412341',
5249+
'MA64011519000001205000534921',
52495250
],
52505251
invalid: [
52515252
'XX22YYY1234567890123',

0 commit comments

Comments
 (0)
Please sign in to comment.