Annotation Type MultiAttachmentSizeGroup
@Documented
@Target({TYPE,FIELD})
@Retention(RUNTIME)
@Constraint(validatedBy=MultiAttachmentSizeGroupValidator.class)
@Repeatable(List.class)
public @interface MultiAttachmentSizeGroup
Check which of the given
fields()
of the annotated element are in compliance with the
MultiAttachmentSize
constraint. By default, there must be at least one field that is in compliance, or this
constraint is violated. The number of fields that must be compliant or in violation of the constraint can be
controlled via maxInvalid()
, maxValid()
, minInvalid()
, and minValid()
. Accepts
any type.- Since:
- 8.1.0
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Defines severalMultiAttachmentSizeIf
constraints on the same element. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
fields
String[] fields- Returns:
- The fields of the annotated element to check. The fields may be
private
.
-
-
-
constraint
MultiAttachmentSize constraint- Returns:
- Details for the
MultiAttachmentSize
constraint to check if the condition is satisfied.
- Default:
- @de.xima.fc.workflow.validation.constraints.MultiAttachmentSize
-
groups
Class<?>[] groups- Returns:
- Allows the specification of validation groups, to which this constraint belongs. When not specified, the
constraint is placed in the
Default
group.
- Default:
- {}
-
maxInvalid
int maxInvalid- Returns:
- Maximum number of fields that may be invalid. Default to no limit.
- Default:
- 2147483647
-
maxValid
int maxValid- Returns:
- Maximum number of fields that can be valid. Default to no limit.
- Default:
- 2147483647
-
message
String message- Returns:
- The default key for creating error messages in case the constraint is violated.
- Default:
- "{de.xima.fc.workflow.validation.constraints.MultiAttachmentSizeGroup.message}"
-
minInvalid
int minInvalid- Returns:
- Minimum number of fields that may be invalid. Defaults to
0
.
- Default:
- 0
-
minValid
int minValid- Returns:
- Minimum number of fields that must be valid. Defaults to
1
.
- Default:
- 1
-
payload
Class<? extends javax.validation.Payload>[] payload- Returns:
- The payload that can be used by clients of the Jakarta Bean Validation API to assign custom payload objects to a constraint.
- Default:
- {}
-
target
Class<?> target- Returns:
- The target class that contains the fields to which this group constraint is applied. When set to
Object
.class, defaults the runtime class of the instance being validated. It is generally good practice to set this target, as it enables checking whether the test method exists without having to perform a validation.
- Default:
- java.lang.Object.class
-