|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Retention(value=RUNTIME) @Target(value={FIELD,PARAMETER,METHOD}) @Constraint(checkWith=DateRangeCheck.class) public @interface DateRange
Check if the date is within the a date range.
Note: This constraint is also satisfied when the value to validate is null, therefore you might also need to specified @NotNull
Optional Element Summary | |
---|---|
ConstraintTarget[] |
appliesTo
In case the constraint is declared for an array, collection or map this controls how the constraint is applied to it and it's child objects. |
String |
errorCode
error code passed to the ConstraintViolation object |
String |
format
The format of the specified dates in a form understandable by the SimpleDateFormat class. |
String |
max
The upper date compared against in the format specified with the dateFormat parameter. |
String |
message
message to be used for the ContraintsViolatedException |
String |
min
The lower date compared against in the format specified with the dateFormat parameter. |
String[] |
profiles
The associated constraint profiles. |
int |
severity
severity passed to the ConstraintViolation object |
String |
target
An expression to specify where in the object graph relative from this object the expression should be applied. |
int |
tolerance
Tolerance in milliseconds the validated value can be beyond the min/max limits. |
public abstract ConstraintTarget[] appliesTo
In case the constraint is declared for an array, collection or map this controls how the constraint is applied to it and it's child objects.
Default: ConstraintTarget.VALUES
Note: This setting is ignored for object types other than array, map and collection.
public abstract String errorCode
public abstract String format
public abstract String max
now
today
yesterday
tomorrow
public abstract String message
ConstraintViolation
public abstract String min
now
today
yesterday
tomorrow
public abstract String[] profiles
public abstract int severity
public abstract String target
Examples:
owner
owner
's property id
public abstract int tolerance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |