Annotation Type Gtin
@Documented
@Constraint(validatedBy=GtinValidator.class)
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(RUNTIME)
@AlternateSize(size1=8,
size2=13)
@Digits(integer=13,
fraction=0)
public @interface Gtin
The annotated element must be a valid Global Trade Item Number (until 2009 known as European
Article Number) in the long (13 digits) or short (8 digits) format.
Supported types are Strings, other Objects are transfered to Strings,
There are numeric, size and checksum tests by apache commons validation routines.
Supported types are Strings, other Objects are transfered to Strings,
null elements
are considered valid.There are numeric, size and checksum tests by apache commons validation routines.
- Author:
- Manfred Tremmel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines several@Gtinannotations on the same element. -
Optional Element Summary
Optional Elements
-
Element Details
-
message
String messagelocalized message.- Returns:
- localized validation message
- Default:
- "{de.knightsoftnet.validators.shared.Gtin.message}"
-
groups
Class<?>[] groupsgroups to use.- Returns:
- array of validation groups
- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadpayload whatever.- Returns:
- payload class
- Default:
- {}
-