Example 2 Custom Validation Message with Substitution Variables
You can specify a validation message with substitution variables.
- Procedure
- In the Define Validation dialog box, type the code as shown in the Script field in the figure Defining Custom Validation Using Substitution Variables.
- In the Custom message field, specify the validation error message using substitution variables from an array.
- 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