Annotation Type Isbn10
-
@Documented @Constraint(validatedBy=Isbn10Validator.class) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(RUNTIME) @SizeWithoutSeparators(min=10, max=10) public @interface Isbn10
The annotated element must be a valid International Standard Book Number in the short (10 digits) format.
Supported types are Strings, other Objects are transfered to Strings,nullelements are considered valid. Minus signs as separators are allowed, whenignoreSeparatorsis set totrue.
There are numeric, size and checksum tests by apache commons validation routines.- Author:
- Manfred Tremmel
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]groupsgroups to use.booleanignoreSeparatorsshould separating minus signs be ignored (true/false).Stringmessagelocalized message.Class<? extends javax.validation.Payload>[]payloadpayload whatever.
-
-
-
Element Detail
-
message
String message
localized message.- Returns:
- localized validation message
- Default:
- "{de.knightsoftnet.validators.shared.Isbn10.message}"
-
-
-
groups
Class<?>[] groups
groups to use.- Returns:
- array of validation groups
- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
payload whatever.- Returns:
- payload class
- Default:
- {}
-
-
-
ignoreSeparators
@OverridesAttribute(constraint=SizeWithoutSeparators.class, name="ignoreMinus") boolean ignoreSeparators
should separating minus signs be ignored (true/false).- Returns:
- true if separators should be ignored
- Default:
- false
-
-