001package com.plivo.api.validators; 002 003import static java.lang.annotation.ElementType.PARAMETER; 004import static java.lang.annotation.RetentionPolicy.RUNTIME; 005import static java.lang.annotation.ElementType.FIELD; 006 007import java.lang.annotation.Retention; 008import java.lang.annotation.Target; 009 010 011@Target({FIELD, PARAMETER}) 012@Retention(value = RUNTIME) 013public @interface InRange { 014 015 /** 016 * @return error message to return when validation fails 017 */ 018 String message() default "value not in range"; 019 020 /** 021 * @return min value the element must be higher than or equal to 022 */ 023 int min(); 024 025 /** 026 * @return max value the element must be lesser than or equal to 027 */ 028 int max(); 029 030}