Annotation Type NotBlank


@Target(FIELD) @Retention(RUNTIME) public @interface NotBlank
Annotation used to validate a string to be not null and contain at least 1 char. For custom or stricter string controls, consider using the Pattern annotation instead. * Example usage: *
  * 
  * public class UserDto {
  *     @NotBlank
  *     private String password;
  * }
  * 
  * 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • message

      String message
      Default:
      "Field must not be null or contain at least 1 character"