@Target(value={TYPE,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Constraint(validatedBy=FieldMatchValidator.class) @Documented public @interface FieldMatch
@FieldMatch(first = "password", second = "confirmPassword", message = "The password fields must match")
Example, compare more than 1 pair of fields:
@FieldMatch.List({ @FieldMatch(first = "password", second = "confirmPassword", message = "The password fields must match"), @FieldMatch(first = "email", second = "confirmEmail", message = "The email fields must match")})
| Modifier and Type | Required Element and Description |
|---|---|
String |
confirmation |
String |
value |
public abstract String value
public abstract String confirmation
public abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
Copyright © 2019 Blossom Project. All rights reserved.