Open
Description
This code:
Iban build = new Iban.Builder()
.countryCode(CountryCode.PL)
.bankCode("22876")
.accountNumber("63810519014")
.build();
System.out.println(build);
throws following exception:
Exception in thread "main" org.iban4j.IbanFormatException: [76nu] must contain only digits.
at org.iban4j.IbanUtil.validateBbanEntryCharacterType(IbanUtil.java:409)
at org.iban4j.IbanUtil.validateBbanEntries(IbanUtil.java:379)
at org.iban4j.IbanUtil.validate(IbanUtil.java:80)
at org.iban4j.Iban$Builder.build(Iban.java:365)
at org.iban4j.Iban$Builder.build(Iban.java:337)
And what is even more weird, this code:
Iban randomIban = Iban.random(CountryCode.PL);
Iban build = new Iban.Builder()
.countryCode(CountryCode.PL)
.bankCode(randomIban.getBankCode())
.accountNumber(randomIban.getAccountNumber())
.build();
throws following exception:
Exception in thread "main" org.iban4j.IbanFormatException: [270nullnull2789991694524099] length is 27, expected BBAN length is: 24
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)
what's wrong?
Metadata
Metadata
Assignees
Labels
No labels