8000 Improve Iban.Builder validation by ccostin93 · Pull Request #80 · arturmkrtchyan/iban4j · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve Iban.Builder validation #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
from

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
0