Annotation Type DateRange
-
@Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Constraint(validatedBy=DateRangeValidator.class) @Documented public @interface DateRange
Annotation for JSR-303 validator. It validates the range of dates/date times are coherent:
- In the case of date: the start date must be either before or equal the end date
- In the case of datetime: the start datetime must be before the end datetime
Temporal
objects of the same concrete type.
-
-
Element Detail
-
start
String start
The name of the field representing the temporal starting a range.- Returns:
- the field name of the range start temporal.
-
-
-
end
String end
The name of the field representing the temporal ending a range.- Returns:
- the field name of the range end temporal.
-
-
-
message
String message
- Default:
- "Either the end and start date aren\'t of the same type or the end date isn\'t after the start date"
-
-
-
groups
Class<?>[] groups
- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
- Default:
- {}
-
-