Annotation Type ModCheck
@Documented
@Deprecated
@Constraint(validatedBy={})
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
public @interface ModCheck
Deprecated.
Modulo check constraint.
Allows to validate that a series of digits pass the mod 10 or mod 11 checksum algorithm.
The supported type is CharSequence. null is considered valid.
- Author:
- George Gastaldi, Hardy Ferentschik
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDeprecated.Defines several@ModCheckannotations on the same element.static enumDeprecated. -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDeprecated.intDeprecated. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintDeprecated.intDeprecated.Class<?>[]Deprecated.booleanDeprecated.Deprecated.Deprecated.intDeprecated.
-
Element Details
-
modType
ModCheck.ModType modTypeDeprecated.- Returns:
- The modulus algorithm to be used
-
multiplier
int multiplierDeprecated.- Returns:
- The multiplier to be used by the chosen mod algorithm
-
-
-
message
String messageDeprecated.- Default:
- "{org.hibernate.validator.constraints.ModCheck.message}"
-
groups
Class<?>[] groupsDeprecated.- Default:
- {}
-
payload
Deprecated.- Default:
- {}
-
startIndex
int startIndexDeprecated.- Returns:
- the start index (inclusive) for calculating the checksum. If not specified 0 is assumed.
- Default:
- 0
-
endIndex
int endIndexDeprecated.- Returns:
- the end index (exclusive) for calculating the checksum. If not specified the whole value is considered
- Default:
- 2147483647
-
checkDigitPosition
int checkDigitPositionDeprecated.- Returns:
- The position of the check digit in input. Per default it is assumes that the check digit is part of the
specified range. If set, the digit at the specified position is used as check digit. If set it the following holds
true:
checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex.
- Default:
- -1
-
ignoreNonDigitCharacters
boolean ignoreNonDigitCharactersDeprecated.- Returns:
- Returns
trueif non digit characters should be ignored,falseif a non digit character results in a validation error.startIndexandendIndexare always only referring to digit characters.
- Default:
- true
-
Mod10CheckandMod11Check