layout: default title: IntRangeFieldValidator Annotation parent: title: Annotations url: annotations.html

IntRangeFieldValidator Annotation

This validator checks that a numeric field has a value within a specified range. If neither min nor max is set, nothing will be done.

Usage

The annotation must be applied at method level.

Parameters

If neither min nor max is set, nothing will be done.

Examples

 @IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "0", max = "42")

 @IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, minExpression = "${minValue}", maxExpression = "${maxValue}")