Closed sanathkd closed 11 months ago
Norway BBAN structure requires 'National Check digit' and 6 character 'Account number'. I think you are providing both in the account number field which is not correct. You might change your code to the below: `
String bankCode = "4435";
String account = "034373";
String nationalCheckDigit = "0";
Iban.Builder builder = new Iban.Builder();
builder.countryCode(CountryCode.NO);
builder.bankCode(bankCode);
builder.accountNumber(account);
builder.nationalCheckDigit(nationalCheckDigit);
Iban value = builder.build();
`
By the way, it is much better to validate this in the library. I will commit a change in order to validate such a case.
BBAN for Norway is appended with "null" which increases its length and hence validation is failing. Can you help me if i'm missing something? Or can this issue be fixed?
I feel its messed up in "iban.java" under method "formatIban()" when converting "toString" in the end.
Test Data BBAN: 44350343730 Code used:
Error thrown: