Package nablarch.core.validation.ee
Annotation Type NumberRange
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy=NumberRangeValidator.class)
@Published
public @interface NumberRange
入力値が指定の範囲内であるかチェックする。
入力値が実数の場合は、
DecimalRangeを用いること。
入力値が1以上10以下の範囲内であるかチェックするエラー時のメッセージは、以下のルールにより決定される。public class Sample{@NumberRange(min = 1, max = 10) String sales;} 入力値が0以上であるかチェックするpublic class Sample{@NumberRange(min = 0) String sales;}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface複数指定用のアノテーションstatic class指定された整数の範囲の数値であることを検証するバリデータ。 -
Optional Element Summary
Optional Elements