Skip to content

Instantly share code, notes, and snippets.

@bigbasti
Last active December 22, 2015 11:59
Show Gist options
  • Save bigbasti/6469111 to your computer and use it in GitHub Desktop.
Save bigbasti/6469111 to your computer and use it in GitHub Desktop.
Demo code for using IBANValidator
private final String VALID_IBAN_DE = "DE89 3704 0044 0532-0130 00";
private final String DE_IBAN_LENGTH = "22";
private final String DE_IBAN_STRUCTURE = "DE2!n8!n10!n";
@Test
public void validGermanIBANStructureCheck() {
boolean result = false;
try {
result = IBANValidator.checkIbanStructure(VALID_IBAN_DE, "DE", DE_IBAN_LENGTH, DE_IBAN_STRUCTURE);
} catch (IBANValidationException e) {}
assertTrue(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment