You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
private String formatIban() {
final StringBuilder sb = new StringBuilder();
sb.append(countryCode.getAlpha2());
sb.append(DEFAULT_CHECK_DIGIT);
sb.append(formatBban());
return sb.toString();
}
Test Data BBAN: 44350343730 Code used:
String set = "44350343730";
String bankCode = "4435";
String account = "0343730";
Iban.Builder builder = new Iban.Builder();
builder.countryCode(CountryCode.NO);
builder.bankCode(bankCode);
builder.accountNumber(account);
Iban value = builder.build();
Error thrown:
Exception in thread "main" org.iban4j.IbanFormatException: [44350343730null] length is 15, expected BBAN length is: 11
at org.iban4j.IbanUtil.validateBbanLength(IbanUtil.java:362)
at org.iban4j.IbanUtil.validate(IbanUtil.java:79)
at org.iban4j.Iban$Builder.build(Iban.java:365)
at org.iban4j.Iban$Builder.build(Iban.java:337)
The text was updated successfully, but these errors were encountered:
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:
`
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:
The text was updated successfully, but these errors were encountered: