@Target(value={TYPE,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Constraint(validatedBy=EqualPropertiesValidator.class) @Documented public @interface EqualProperties
NotNull.
Set violationOnProperty() to true
if you want the ConstraintViolation on each of the violating
properties instead of the bean.| Modifier and Type | Required Element and Description |
|---|---|
String[] |
value
property names (at least two) which have to have equal values.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
groups |
String |
message |
Class<? extends javax.validation.Payload>[] |
payload |
boolean |
violationOnProperty
Specifies whether the
ConstraintViolation should be attached on each
violation property or on the bean. |
public abstract String[] value
public abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
public abstract boolean violationOnProperty
ConstraintViolation should be attached on each
violation property or on the bean. By default on the bean.true if the violation should be attached on each violating property,
false if it should be attached on the bean.Copyright © 2016. All rights reserved.