Implementing a Validator

If a validator is present in a form, each time a postback occurs on that form an expression associated with the validator will be evaluated. If the value returned by the expression is True, a custom error message will appear. The user must then do whatever is necessary to satisfy the validator before they can proceed.

Implementation:

  1. Switch to the Definition tab.
  2. Select the intended question group.
  3. Add a new question and change its type to Validator.
  4. Type a validation error message into the Question Text field.
  5. Click Save Question.
  6. Switch back to the Definition tab.
  7. Select the new question.
  8. Right-click the new question.
  9. Select Attributes.
  10. Add a new attribute with the type Validator Expression.
  11. Switch to the new attribute's Value panel.
  12. Use the Attribute Expression field to enter a single-line expression. When this expression returns a value of True, your validator will be triggered.
  13. Click OK.