Annotation Type NonEmptySingleFileGroup
-
@Documented @Target({TYPE,FIELD}) @Retention(RUNTIME) @Constraint(validatedBy=NonEmptySingleFileGroupValidator.class) @Repeatable(List.class) public @interface NonEmptySingleFileGroup
Check which of the givenfields()
of the annotated element are in compliance with theNonEmptySingleFile
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 viamaxInvalid()
,maxValid()
,minInvalid()
, andminValid()
. Accepts any type.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description String[]
dependants
Deprecated.This field was added accidentally and should not be in this annotation.String[]
fields
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description NonEmptySingleFile
constraint
Class<?>[]
groups
int
maxInvalid
int
maxValid
String
message
int
minInvalid
int
minValid
Class<? extends javax.validation.Payload>[]
payload
Class<?>
target
-
-
-
Element Detail
-
dependants
String[] dependants
Deprecated.This field was added accidentally and should not be in this annotation. The value is not, and never was, processed in any way.- Returns:
- Ignored.
-
-
-
fields
String[] fields
- Returns:
- The fields of the annotated element to check. The fields may be
private
.
-
-
-
constraint
NonEmptySingleFile constraint
- Returns:
- Details for the
NonEmptySingleFile
constraint to check if the condition is satisfied.
- Default:
- @de.xima.fc.workflow.validation.constraints.NonEmptySingleFile
-
-
-
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:
- {}
-
-
-
message
String message
- Returns:
- The default key for creating error messages in case the constraint is violated.
- Default:
- "{de.xima.fc.workflow.validation.constraints.NonEmptySingleFileGroup.message}"
-
-
-
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
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
-
-