Home > Guides > Core Developers Guide > Annotations > DateRangeFieldValidator Annotation

This validator checks that a date field has a value within a specified range.

Usage

The annotation must be applied at method level.

Parameters

Parameter Required Default Notes
messageyes field error message
keyno i18n key from language specific properties file.
messageParamsno Additional params to be used to customize message - will be evaluated against the Value Stack
fieldNameno  
shortCircuitnofalseIf this validator should be used as shortCircuit.
typeyesValidatorType.FIELDEnum value from ValidatorType. Either FIELD or SIMPLE can be used here.
min no   Date property. The minimum the date must be.
minExpressionno OGNL expression used to obtain the minimum the date must be.
max no   Date property. The maximum date can be.
maxExpressionno OGNL expression used to obtain the maximum date can be.
maxExpressionno OGNL expression used to obtain the maximum date can be.
dateFormatno Format used to parse min/max value.

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

Examples