com.avaje.ebean.validation
Annotation Type Length


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface Length

Validate the length of a String property.

You can only apply this to String properties.


Optional Element Summary
 int max
          The maximum length of a String.
 int min
          The minimum length of a String.
 

min

public abstract int min
The minimum length of a String. Defaults to 0.

Checks that the string length is greater than or equal to min.

Default:
0

max

public abstract int max
The maximum length of a String. Defaults to Integer.MAX_VALUE.

Checks that the string length is less than or equal to max.

Default:
2147483647


Copyright © 2010. All Rights Reserved.