@Documented @Constraint(validatedBy={}) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(value=RUNTIME) public @interface ModCheck
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.
| Modifier and Type | Required Element and Description |
|---|---|
ModCheck.ModType |
modType |
int |
multiplier |
| Modifier and Type | Optional Element and Description |
|---|---|
int |
checkDigitPosition |
int |
endIndex |
Class<?>[] |
groups |
boolean |
ignoreNonDigitCharacters |
String |
message |
Class<? extends Payload>[] |
payload |
int |
startIndex |
public abstract ModCheck.ModType modType
public abstract int multiplier
public abstract String message
public abstract Class<?>[] groups
public abstract int startIndex
public abstract int endIndex
public abstract int checkDigitPosition
checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex.public abstract boolean ignoreNonDigitCharacters
true if non digit characters should be ignored, false if a non digit character
results in a validation error. startIndex and endIndex are always only referring to digit
characters.Copyright © 2018 JBoss by Red Hat. All rights reserved.