Home > Guides > Core Developers Guide > Validation > double validator

Description

Field Validator that checks if the double specified is within a certain range.

Parameters

  • fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required
  • minInclusive - the minimum inclusive value in FloatValue format specified by Java language (if none is specified, it will not be checked)
  • maxInclusive - the maximum inclusive value in FloatValue format specified by Java language (if none is specified, it will not be checked)
  • minExclusive - the minimum exclusive value in FloatValue format specified by Java language (if none is specified, it will not be checked)
  • maxExclusive - the maximum exclusive value in FloatValue format specified by Java language (if none is specified, it will not be checked)
  • minInclusiveExpression - the minimum inclusive value specified as a OGNL expression (if none is specified, it will not be checked)
  • maxInclusiveExpression - the maximum inclusive value specified as a OGNL expression (if none is specified, it will not be checked)
  • minExclusiveExpression - the minimum exclusive value specified as a OGNL expression (if none is specified, it will not be checked)
  • maxExclusiveExpression - the maximum exclusive value specified as a OGNL expression (if none is specified, it will not be checked)

You can specify either minInclusive, maxInclusive, minExclusive and maxExclusive or minInclusiveExpression, maxInclusiveExpression, minExclusiveExpression and maxExclusiveExpression as a OGNL expression, see example below. You can always try to mix params but be aware that such behaviour was not tested.

Warning

Do not use ${minInclusiveExpression}, ${maxInclusiveExpression}, ${minExclusiveExpressionExpression} and ${maxExclusive} as an expression as this will turn into infinitive loop!

Examples