Example 2 Custom Validation Message with Substitution Variables

You can specify a validation message with substitution variables.

Procedure

  1. In the Define Validation dialog, type the code as shown in the Script field in the figure Defining Custom Validation Using Substitution Variables.
    Defining Custom Validation Using Substitution Variables
  2. In the Custom message field, specify the validation error message using substitution variables from an array.
  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, a validation error message using the substitution variables from the array appears on the form.

    Validation Script Example 2