Package io.dropwizard.validation
Annotation Type MaxDuration
-
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Documented @Constraint(validatedBy=MaxDurationValidator.class) public @interface MaxDuration
The annotated element must be aDurationwhose value must be higher or equal to the specified minimum.nullelements are considered valid
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description longvalue
-
-
-
-
message
String message
- Default:
- "must be less than (or equal to, if in \'inclusive\' mode) {value} {unit}"
-
-
-
groups
Class<?>[] groups
- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
- Default:
- {}
-
-
-
unit
TimeUnit unit
- Returns:
- unit of the value the element must be higher or equal to
- Default:
- java.util.concurrent.TimeUnit.SECONDS
-
-
-
inclusive
boolean inclusive
- Returns:
trueif the validation is to allow values equal tovalue(). False if the validation is to be exclusive. Defaults totrue.
- Default:
- true
-
-