Annotation Type BankCountry
@Documented
@Constraint(validatedBy=BankCountryValidator.class)
@Target({TYPE,ANNOTATION_TYPE})
@Retention(RUNTIME)
public @interface BankCountry
The annotated bean must contain three properties:
Supported types are beans,
If
- country code (option
fieldCountryCode) - iban (option
fieldIban) - bic (option
fieldBic)
Supported types are beans,
null elements are considered valid.If
allowLowerCaseCountryCode is set to true, lower case country codes are accepted.- Author:
- Manfred Tremmel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines severalBankCountryannotations on the same element. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanare lower case country codes allowed (true/false).field name of the bic field.field name of the country code field.field name of the iban field.Class<?>[]groups to use.localized message.localized message.Class<? extends jakarta.validation.Payload>[]payload whatever.
-
Element Details
-
message
String messagelocalized message.- Returns:
- localized validation message
- Default:
- "{de.knightsoftnet.validators.shared.BankCountry.message}"
-
messageWrongBic
String messageWrongBiclocalized message.- Returns:
- localized message for wrong bic
- Default:
- "{de.knightsoftnet.validators.shared.BankCountryWrongBic.message}"
-
groups
Class<?>[] groupsgroups to use.- Returns:
- array of validation groups
- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadpayload whatever.- Returns:
- payload class
- Default:
- {}
-
fieldCountryCode
String fieldCountryCodefield name of the country code field.- Returns:
- field/path contains country code
- Default:
- "countryCode"
-
allowLowerCaseCountryCode
boolean allowLowerCaseCountryCodeare lower case country codes allowed (true/false).- Returns:
- true if lower case countries are allowed
- Default:
- false
-
fieldIban
String fieldIbanfield name of the iban field.- Returns:
- field/path contains iban
- Default:
- "iban"
-
fieldBic
String fieldBicfield name of the bic field.- Returns:
- field/path contains bic
- Default:
- "bic"
-