Package javax.validation
Annotation Interface Constraint
Meta annotation to declare a constraint annotation.
Every custom constraint annotation meta-annotated with this very annotation must implement the following fields:
String message()
- the message to be used if this constraint is violated.Class<?>[] groups() default {};
- the validation group. SeeGroupSequence
. If a constraint gets applied without any specific group thenDefault
is assumed.Class<? extends Payload>[] payload() default {};
- CustomPayload
for the contstraint.
- Version:
- $Rev$ $Date$
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
validatedBy
Class<? extends ConstraintValidator<?,?>>[] validatedBy- Returns:
- the
ConstraintValidator
which gets used when this constraint is applied to fields, methods (getters), types or parameter.
-