1 //$Id: Range.java,v 1.1 2005/05/27 08:58:54 epbernard Exp $2 package org.hibernate.validator;3 4 import static java.lang.annotation.ElementType.METHOD ;5 import static java.lang.annotation.RetentionPolicy.RUNTIME ;6 7 import java.lang.annotation.Retention ;8 import java.lang.annotation.Target ;9 10 /**11 * The annotated elemnt has to be in the appropriate range. Apply on numeric values or string12 * representation of the numeric value.13 * @author Gavin King14 */15 @ValidatorClass(RangeValidator.class)16 @Target (METHOD) @Retention (RUNTIME)17 public @interface Range {18 long max() default Long.MAX_VALUE;19 long min() default Long.MIN_VALUE;20 String message() default "must be between {min} and {max}";21 }22