Annotation Type CreditCardNumber
@Documented
@Constraint(validatedBy=CreditCardNumberValidator.class)
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(RUNTIME)
@Size(max=16)
public @interface CreditCardNumber
The annotated element must be a valid credit card number.
Supported types are Strings, other Objects are transfered to Strings,
There are format, size and LUN checksum tests by apache commons validation routines.
There are no tests for credit card validity!
Supported types are Strings, other Objects are transfered to Strings,
null elements
are considered valid.There are format, size and LUN checksum tests by apache commons validation routines.
There are no tests for credit card validity!
- Author:
- Manfred Tremmel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines several@CreditCardNumberannotations on the same element. -
Optional Element Summary
Optional Elements
-
Element Details
-
message
String messagelocalized messages, do not implement ourself, use the hibernate texts.- Returns:
- localized validation message
- Default:
- "{org.hibernate.validator.constraints.CreditCardNumber.message}"
-
groups
Class<?>[] groupsgroups to use.- Returns:
- array of validation groups
- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadpayload whatever.- Returns:
- payload class
- Default:
- {}
-