Skip to content

Improve Iban.Builder validation#80

Open
ccostin93 wants to merge 2 commits intoarturmkrtchyan:masterfrom
ccostin93:iban-builder-validation
Open

Improve Iban.Builder validation#80
ccostin93 wants to merge 2 commits intoarturmkrtchyan:masterfrom
ccostin93:iban-builder-validation

Conversation

@ccostin93
Copy link
Contributor

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.

Related issues:

@hajk1 This PR also relates to your proposed fix in: #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant