SEPA Nuclet IBAN validation: activate via rule management or call the validation methods directly. |
Language: Deutsch · English
Optionally validate IBANs with respect to structure and length – via the rule management or by calling the validation methods directly.
On this page |
This page was machine-translated from German as a first draft and is currently under review. The authoritative source remains the German original (see the language switch above). |
From version 2.0.0, IBANs can optionally be validated with respect to structure and length. There are two ways to integrate the validation:
The simplest way to integrate it is to hook the rule org.nuclet.sepa.rule.ValidateIBAN into the rule management.
This rule is designed for those BOs that were identified as debtors (or creditors) in section 4.8.1 and wrapped via DebitorWrapper (or CreditorWrapper).
The rule takes effect when the respective BOs are created and updated, provided it is hooked into the rule management accordingly.
There are two variants of the direct call.
In the first, the structure specifications are passed explicitly:
// In diesem Fall wird die IBAN zusammen mit dem Länderkürzel (ISO-4217-Code) // sowie der vorgegebenen IBAN-Länge und der vorgegebenen IBAN-Struktur übergeben // private final String DE_IBAN_LENGTH = "22"; private final String DE_IBAN_STRUCTURE = "DE2!n8!n10!n"; (...) boolean bResult = IBANValidator.checkIbanStructure(strIban, "DE", DE_IBAN_LENGTH, DE_IBAN_STRUCTURE); |
In the second variant the structure specifications are determined implicitly from the IBAN registry:
// In diesem Fall wird nur der aktuelle RuleContext und die zu validierende IBAN übergeben // boolean bResult = IBANValidator.checkIbanStructure(context, strIban); |