Package jakarta.validation.constraints
Annotation Interface NotBlank
@Documented
@Constraint(validatedBy={})
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
public @interface NotBlank
The annotated element must not be
null
and must contain at least one
non-whitespace character. Accepts CharSequence
.- Since:
- 2.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Defines several@NotBlank
constraints on the same element. -
Optional Element Summary