Annotation Interface ValidWithGroups
@Documented
@Retention(RUNTIME)
@Target({FIELD,METHOD,PARAMETER,ANNOTATION_TYPE,TYPE_USE})
@Constraint(validatedBy=Validator.class)
public @interface ValidWithGroups
Annotates a field that will validate the field using the validation groups specified in this annotations
groups()
property.-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements
-
Element Details
-
message
String messageGet message generated when the annotation fails.- Returns:
- the message
- Default:
"{dev.getelements.elements.model.ValidForGroups.message}"
-
groups
Class<?>[] groupsThe groups which activate this specific validator.- Returns:
- the groups
- Default:
{}
-
value
Class<?>[] valueThe value of groups to use when validating. This will override the current group and use the groups specified in this value instead.- Returns:
- the groups against which to validate
- Default:
{}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadThePayload
, see for more details.- Returns:
- the payload
- Default:
{}
-