org.hibernate.validator.constraints
Annotation Type NotBlank


@Documented
@Constraint(validatedBy=NotBlankValidator.class)
@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(value=RUNTIME)
@NotNull
public @interface NotBlank

Validate that the annotated string is not null or empty. The difference to NotEmpty is that trailing whitespaces are getting ignored.

Author:
Hardy Ferentschik

Optional Element Summary
 java.lang.Class<?>[] groups
           
 java.lang.String message
           
 java.lang.Class<? extends javax.validation.Payload>[] payload
           
 

message

public abstract java.lang.String message
Default:
"{org.hibernate.validator.constraints.NotBlank.message}"

groups

public abstract java.lang.Class<?>[] groups
Default:
{}

payload

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


Copyright © 2011 Oracle Corporation. All Rights Reserved.