Package io.dropwizard.validation
Annotation Type MinDataSize
-
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Documented @Constraint(validatedBy=MinDataSizeValidator.class) public @interface MinDataSize
The annotated element must be aDataSizewhose value must be higher or equal to the specified minimum.
nullelements are considered valid- Since:
- 2.0
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description longvalueThe annotation's value.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]groupsThe groups the constraint belongs to.StringmessageThe validation message for this constraint.Class<? extends javax.validation.Payload>[]payloadThe payloads of this constraint.DataSizeUnitunitThe unit of the annotation.
-
-
-
-
message
String message
The validation message for this constraint.- Returns:
- the message
- Default:
- "must be greater than or equal to {value} {unit}"
-
-
-
groups
Class<?>[] groups
The groups the constraint belongs to.- Returns:
- an array of classes representing the groups
- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
The payloads of this constraint.- Returns:
- the array of payload classes
- Default:
- {}
-
-
-
unit
DataSizeUnit unit
The unit of the annotation.- Returns:
- unit of the value the element must be higher or equal to
- Default:
- io.dropwizard.util.DataSizeUnit.BYTES
-
-