javax.validation.constraints
Annotation Type Size
@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(value=RUNTIME)
@Documented
@Constraint(validatedBy={})
public @interface Size
The annotated element size must be between the specified boundaries (included).
Supported types are:
String
(string length is evaluated)
Collection
(collection size is evaluated)
Map
(map size is evaluated)
- Array (array length is evaluated)
null
elements are considered valid.
- Author:
- Emmanuel Bernard
message
public abstract String message
- Default:
- "{javax.validation.constraints.Size.message}"
groups
public abstract Class<?>[] groups
- Default:
- {}
payload
public abstract Class<? extends Payload>[] payload
- Default:
- {}
min
public abstract int min
- Returns:
- size the element must be higher or equal to
- Default:
- 0
max
public abstract int max
- Returns:
- size the element must be lower or equal to
- Default:
- 2147483647
Copyright © 2007-2012. All Rights Reserved.