Package io.dropwizard.validation
Annotation Interface ValidationMethod
@Target({TYPE,ANNOTATION_TYPE,METHOD})
@Retention(RUNTIME)
@Constraint(validatedBy=MethodValidator.class)
@Documented
public @interface ValidationMethod
Validates a bean predicate method as returning true. Bean predicates must be of the form
isSomething
or they'll be silently ignored.-
Optional Element Summary
Optional Elements
-
Element Details
-
message
String messageThe validation message for this constraint.- Returns:
- the message
- Default:
- "is not valid"
-
groups
Class<?>[] groupsThe groups the constraint belongs to.- Returns:
- an array of classes representing the groups
- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadThe payloads of this constraint.- Returns:
- the array of payload classes
- Default:
- {}
-