diff --git a/src/main/java/org/iban4j/bban/BbanStructure.java b/src/main/java/org/iban4j/bban/BbanStructure.java index 204ae0d4..d90f82f9 100644 --- a/src/main/java/org/iban4j/bban/BbanStructure.java +++ b/src/main/java/org/iban4j/bban/BbanStructure.java @@ -304,6 +304,13 @@ private BbanStructure(final BbanStructureEntry... entries) { BbanStructureEntry.accountNumber(13, 'n'), BbanStructureEntry.nationalCheckDigit(2, 'n'))); + structures.put(CountryCode.MG, + new BbanStructure( + BbanStructureEntry.bankCode(5, 'n'), + BbanStructureEntry.branchCode(5, 'n'), + BbanStructureEntry.accountNumber(11, 'c'), + BbanStructureEntry.nationalCheckDigit(2, 'n'))); + structures.put(CountryCode.NL, new BbanStructure( BbanStructureEntry.bankCode(4, 'a'), diff --git a/src/test/java/org/iban4j/TestDataHelper.java b/src/test/java/org/iban4j/TestDataHelper.java index ad2967d8..c004ba8b 100644 --- a/src/test/java/org/iban4j/TestDataHelper.java +++ b/src/test/java/org/iban4j/TestDataHelper.java @@ -275,6 +275,13 @@ public static Collection getIbanData() { .accountNumber("0000123456789") .nationalCheckDigit("51") .build(), "ME25505000012345678951"}, + {new Iban.Builder() + .countryCode(CountryCode.MG) + .bankCode("91389") + .branchCode("12738") + .accountNumber("36945544212") + .nationalCheckDigit("12") + .build(), "MG5791389127383694554421212"}, {new Iban.Builder() .countryCode(CountryCode.NL) .bankCode("ABNA")