Skip to content

Commit

Permalink
CU-86b2gwt48_PW-2040--IBAN-validation-problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ptorres-prowide committed Nov 15, 2024
1 parent 69557a4 commit 8fb2a67
Show file tree
Hide file tree
Showing 6 changed files with 608 additions and 234 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Prowide Core - CHANGELOG

#### 9.4.19 - SNAPSHOT
* (PW-2040) Added IBAN validation for the 88 supported countries

#### 9.4.18 - October 2024
* Added new `FieldEnum` with all the available field names
* Code security improvements as per CodeQL recommendations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public enum IbanValidationResult {
INVALID_CHARACTERS("Invalid character '${found}' found"),
MISSING_CHECK_DIGITS("Missing check digits"),
INVALID_CHECK_DIGITS_FORMAT("Expected 2 check digits and found ${found}"),
IVALID_CHECK_DIGITS("The expected computed check digit is ${expectedCheckDigit} and ${found} was found"),
INVALID_CHECK_DIGITS("The expected computed check digit is ${expectedCheckDigit} and ${found} was found"),

MISSING_BBAN("Missing custom account number (BBAN)"),
BBAN_MAX_LENGTH(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static IbanValidationResult validateCheckDigit(final String iban) {
if (calculateMod(iban) != 1) {
final String checkDigit = IBAN.getCheckDigits(iban);
final String expectedCheckDigit = calculateCheckDigit(iban);
IbanValidationResult result = IbanValidationResult.IVALID_CHECK_DIGITS;
IbanValidationResult result = IbanValidationResult.INVALID_CHECK_DIGITS;
result.setExpectedCheckDigit(expectedCheckDigit);
result.setFound(checkDigit);
return result;
Expand Down
Loading

0 comments on commit 8fb2a67

Please sign in to comment.