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
 Class<?>[] groups
           
 String message
           
 Class<? extends Payload>[] payload
           
 

message

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

groups

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

payload

public abstract Class<? extends Payload>[] payload
Default:
{}


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved