Top Description Inners Methods
org.hibernate.validator.constraints

public @Interface CreditCardNumber

extends Annotation
Annotations
@Documented
@Constraint
validatedBy:
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Repeatable:List
@ReportAsSingleViolation
@LuhnCheck
Static Imports
java.lang.annotation.ElementType.ANNOTATION_TYPE, .ElementType.CONSTRUCTOR, .ElementType.FIELD, .ElementType.METHOD, .ElementType.PARAMETER, .ElementType.TYPE_USE, .RetentionPolicy.RUNTIME

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!
Authors
Hardy Ferentschik, Emmanuel Bernard

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static @interface
CreditCardNumber.List

Defines several @CreditCardNumber annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]
public boolean

Returns:

Whether non-digit characters in the validated input should be ignored (true) or result in a validation error (false). Default is false
ignoreNonDigitCharacters
()

public String
public Class<? extends Payload>[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

groupsback to summary
public Class<?>[] groups()
ignoreNonDigitCharactersback to summary
public boolean ignoreNonDigitCharacters()
Returns:boolean

Whether non-digit characters in the validated input should be ignored (true) or result in a validation error (false). Default is false

Annotations
@OverridesAttribute
constraint:LuhnCheck
name:ignoreNonDigitCharacters
messageback to summary
public String message()
payloadback to summary
public Class<? extends Payload>[] payload()
org.hibernate.validator.constraints back to summary

public @Interface CreditCardNumber.List

extends Annotation
Annotations
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Documented

Defines several @CreditCardNumber annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public CreditCardNumber[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public CreditCardNumber[] value()