From d137ad8edd2d870e484a00d95decdcce41fa02f4 Mon Sep 17 00:00:00 2001 From: ptorres-prowide Date: Thu, 27 Jun 2024 13:56:18 -0300 Subject: [PATCH] CU-86b11jgdc_PW-1913--IBAN-Validation--Request-for-Information --- CHANGELOG.md | 3 +++ .../resources/BbanStructureValidations.json | 20 +++++++++++++++++++ .../prowidesoftware/swift/model/IBANTest.java | 1 + 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a332864..58e1309f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Prowide Core - CHANGELOG +#### 9.4.17 - SNAPSHOT + * (PW-1913) Added IBAN validation for Egypt + #### 9.4.16 - May 2024 * (PW-1862) Added NarrativeFragment class for detailed line information in StructuredNarrative fragments * Fixed SwiftMessage getPDE(): return empty value instead of null when codeword exists and has no value diff --git a/src/main/resources/BbanStructureValidations.json b/src/main/resources/BbanStructureValidations.json index a5d85c350..8dc55754a 100644 --- a/src/main/resources/BbanStructureValidations.json +++ b/src/main/resources/BbanStructureValidations.json @@ -219,6 +219,26 @@ } ] }, + { + "country_code": "EG", + "validation_rules": [ + { + "entry_type": "bank_code", + "length": 4, + "character_type": "n" + }, + { + "entry_type": "branch_code", + "length": 4, + "character_type": "n" + }, + { + "entry_type": "account_number", + "length": 17, + "character_type": "n" + } + ] + }, { "country_code": "HR", "validation_rules": [ diff --git a/src/test/java/com/prowidesoftware/swift/model/IBANTest.java b/src/test/java/com/prowidesoftware/swift/model/IBANTest.java index 51259e62c..faa407ad2 100644 --- a/src/test/java/com/prowidesoftware/swift/model/IBANTest.java +++ b/src/test/java/com/prowidesoftware/swift/model/IBANTest.java @@ -261,6 +261,7 @@ public void testSomeValidCodes() { assertIbanOk(" GB06 BARC 2006 0500 9524 86"); assertIbanOk(" GB06 LOYD 3097 5104 5702 05."); assertIbanOk("GB26BOFS80200643721002"); + assertIbanOk("EG389004000100300074201200001"); } private void assertIbanOk(String string) {