validation

The validation element is used to validate answers on a question page. Each validation element has an expression, which is used to evaluate if an answer is a valid answer. The expression must evaluate to true for the script execution to proceed beyond the page containing the validation element. For example, the following validation element displays a warning message if the value for the wage amount is less than or equal to zero:

Figure 1. Validation XML
<validation expression="Income.wageAmount &gt; 0 ">
  <message id="Page2.noWageValidationMessage">
    <![CDATA[You entered %1d as your wage amount. 
      Please enter a value greater than zero.]]>
   <argument id="Income.wageAmount" />
  </message>
</validation>