Annotation Interface FieldsShouldNotMatch
@Constraint(validatedBy=FieldsShouldNotMatchValidator.class)
@Target(TYPE)
@Retention(RUNTIME)
public @interface FieldsShouldNotMatch
FieldsShouldNotMatch.java - Custom annotation for validating that two fields do not match.
- Author:
- Kristian Popov
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionFirst field name.Second field name. -
Optional Element Summary
Optional Elements
-
Element Details
-
message
String messageError message.- Default:
"Fields must not match"
-
firstField
String firstFieldFirst field name. -
secondField
String secondFieldSecond field name. -
groups
Class<?>[] groupsValidation groups.- Default:
{}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadPayload.- Default:
{}
-