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:
- Switch to the Definition tab.
- Select the intended question group.
- Add a new question and change its type to Validator.
- Type a validation error message into the Question Text field.
- Click Save Question.
- Switch back to the Definition tab.
- Select the new question.
- Right-click the new question.
- Select Attributes.
- Add a new attribute with the type Validator Expression.
- Switch to the new attribute's Value panel.
- Use the Attribute Expression field to enter a single-line expression. When this expression returns a value of True, your validator will be triggered.
- Click OK.