Annotation Type 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
    Author:
    Hardy Ferentschik
    See Also:
    Character.isWhitespace(char)
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<?>[] groups  
      java.lang.String message  
      java.lang.Class<? extends Payload>[] payload  
    • Element Detail

      • message

        java.lang.String message
        Default:
        "{jakarta.validation.constraints.NotBlank.message}"
      • groups

        java.lang.Class<?>[] groups
        Default:
        {}
      • payload

        java.lang.Class<? extends Payload>[] payload
        Default:
        {}