<field> / <range>

<range> is an optional sub-element of <field> specifying that valid field values must be between the defined minimum and maximum. Field values that fall outside the range are flagged as errors. The data type and parse format are inherited from the enclosing <field> element. <range> is only applicable for date and numeric fields.

Field Range

min

Minimum value for the field. If this is not defined, max must be defined. (Default=null)

max

Maximum value for the field. If this is not defined, min must be defined. (Default=null)

The following example specifies that valid build dates cannot exceed the end of 2100:

<field id="2" name="build date" type="date" format="MM/dd/yy">
  <range max="12/31/2100"/>
</field>

The following example specifies that the confidence value must be between 0.1 and 1.0:

<field id="8" name="confidence" type="double">
  <range min="0.1" max="1.0"/>
</field>