Package org.codelibs.fess.validation
Annotation Interface CustomSize
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy=CustomSizeValidator.class)
public @interface CustomSize
Validation constraint for custom size limits based on configuration keys.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]The validation groups this constraint belongs to.Gets the configuration key for the maximum size constraint.The error message when validation fails.Gets the configuration key for the minimum size constraint.Class<? extends jakarta.validation.Payload>[]The payload associated with this constraint.
-
Element Details
-
message
String messageThe error message when validation fails.- Returns:
- the error message
- Default:
"{jakarta.validation.constraints.Size.message}"
-
groups
Class<?>[] groupsThe validation groups this constraint belongs to.- Returns:
- the groups
- Default:
{}
-
payload
Class<? extends jakarta.validation.Payload>[] payloadThe payload associated with this constraint.- Returns:
- the payload
- Default:
{}
-
minKey
String minKeyGets the configuration key for the minimum size constraint.- Returns:
- name of size the element must be higher or equal to
- Default:
""
-
maxKey
String maxKeyGets the configuration key for the maximum size constraint.- Returns:
- name of size the element must be lower or equal to
- Default:
""
-