Annotation Type CreditCardNumber
-
@Documented @Constraint(validatedBy={}) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) @ReportAsSingleViolation @LuhnCheck public @interface CreditCardNumber
The annotated element has to represent a valid credit card number. This is the Luhn algorithm implementation which aims to check for user mistake, not credit card validity!- Author:
- Hardy Ferentschik, Emmanuel Bernard
-
-
Element Detail
-
message
String message
- Default:
- "{org.hibernate.validator.constraints.CreditCardNumber.message}"
-
-
-
groups
Class<?>[] groups
- Default:
- {}
-
-
-
ignoreNonDigitCharacters
@OverridesAttribute(constraint=LuhnCheck.class, name="ignoreNonDigitCharacters") boolean ignoreNonDigitCharacters
- Returns:
- Whether non-digit characters in the validated input should be ignored (
true) or result in a validation error (false). Default isfalse
- Default:
- false
-
-