|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Retention(value=RUNTIME)
@Target(value={PARAMETER,METHOD})
@Constraint(checkWith=AssertFieldConstraintsCheck.class)
public @interface AssertFieldConstraintsCheck if the value satisfies the constraints defined for the specified field.
| Optional Element Summary | |
|---|---|
Class<?> |
declaringClass
The class in which the field is declared. |
String[] |
profiles
The associated constraint profiles. |
String |
value
Name of the field. |
String |
when
Formula returning true if this constraint shall be evaluated and
false if it shall be ignored for the current validation. |
public abstract Class<?> declaringClass
public abstract String[] profiles
public abstract String value
public abstract String when
true if this constraint shall be evaluated and
false if it shall be ignored for the current validation.
Important: The formula must be prefixed with the name of the scripting language that is used.
E.g. groovy:_this.amount > 10
Available context variables are:
_this -> the validated bean
_value -> the value to validate (e.g. the field value, parameter value, method return value,
or the validated bean for object level constraints)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||