Package jakarta.validation.constraints
Annotation Interface NotEmpty
@Documented
@Constraint(validatedBy={})
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
public @interface NotEmpty
The annotated element must not be
null nor empty.
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)
- Since:
- 2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines several@NotEmptyconstraints on the same element. -
Optional Element Summary
Optional Elements