Example 1 Setting a Custom Validation Message

In this example, the text field has the name petNumber.

The General Tab

This means that the value submitted for this text field by a user can be referenced in the validation script by the expression control.petNumber.value.

Procedure

  1. In the Define Validation dialog, specify the value in the Script field.
    Defining Custom Validation
  2. In the Custom text field, type the validation error message that you want the user to see on specifying incorrect data.
  3. Confirm that the Enabled check box is selected, and click Finish.

    If the user submits a value other than the one specified in the validation script, the validation error message appears on the form.

    Validation Script Example 1