I extended the Iban.Builder validation to be based on BbanStructure of the passed country.
If some entry is missing, the validation will throw an exception with the missing field. This makes sense because the BbanStructure will be used in the next steps formatIban -> formatBban and there is no reason to go to this step if the given data is not enough to generate a valid IBAN.
Changes:
extended validation
simplified UnsupportedCountryException to expect just the country code. The error message was moved to the exception itself and is based on the passed country code.
I extended the Iban.Builder validation to be based on BbanStructure of the passed country. If some entry is missing, the validation will throw an exception with the missing field. This makes sense because the BbanStructure will be used in the next steps
formatIban -> formatBban
and there is no reason to go to this step if the given data is not enough to generate a valid IBAN.Changes:
UnsupportedCountryException
to expect just the country code. The error message was moved to the exception itself and is based on the passed country code.Related issues:
@hajk1 This PR also relates to your proposed fix in: https://github.com/arturmkrtchyan/iban4j/pull/75