Annotation Interface FieldMatch
@Constraint(validatedBy=FieldMatchValidator.class)
@Documented
@Target({TYPE,ANNOTATION_TYPE})
@Retention(RUNTIME)
public @interface FieldMatch
Validation annotation to validate that two fields are equal.
An array of fields and their matching confirmation fields can be supplied.
Example, compare 1 pair of fields:
@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") })
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Defines several@FieldMatch
annotations on the same element -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements