org.hibernate.validator.constraints
Annotation Type Length


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

Validate that the string is between min and max included.

Author:
Emmanuel Bernard, Hardy Ferentschik

Optional Element Summary
 Class<?>[] groups
           
 int max
           
 String message
           
 int min
           
 Class<? extends Payload>[] payload
           
 

min

public abstract int min
Default:
0

max

public abstract int max
Default:
2147483647

message

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

groups

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

payload

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


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