Package jakarta.validation.constraints
Annotation Interface Size
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Documented
@Constraint(validatedBy={})
public @interface Size
The annotated element size must be between the specified boundaries (included).
Supported types are:
CharSequence
(length of character sequence is evaluated)Collection
(collection size is evaluated)Map
(map size is evaluated)- Array (array length is evaluated)
null
elements are considered valid.
-
Nested Class Summary
-
Optional Element Summary
-
Element Details