Annotation Interface TrimmedLength
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy=TrimmedLengthImpl.class)
public @interface TrimmedLength
The annotated element length must be between the specified boundaries (included).
Trailing and ending whitespaces are ignored.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines several@TrimmedSizeannotations on the same element -
Optional Element Summary
Optional Elements
-
Element Details
-
message
String message- Returns:
- The constraint error message
- Default:
- "{org.hibernate.validator.constraints.Length.message}"
-
groups
Class<?>[] groups- Returns:
- The subset of constraints
- Default:
- {}
-
payload
Class<? extends jakarta.validation.Payload>[] payload- Returns:
- The attached Payload type
- Default:
- {}
-
min
int min- Returns:
- The size the element must be higher or equal to
- Default:
- 0
-
max
int max- Returns:
- The size the element must be lower or equal to
- Default:
- 2147483647
-