Adding error messages for interactive forms
In this recipe, we will see how we can add error messages to interactive forms. We will see how a Date input field may be set to produce error messages when a wrong date is passed.
How to do it...
Follow these steps:
On the Object palette of the Date panel, select the Value tab.
Select a validation pattern from the list box provided.
Select the Error checkbox and in the Validation Pattern Message area and enter the message that you like to be displayed.
Activate your form.
How it works...
When the user enters in the required format, no error is displayed. When a wrong date is entered, the error is shown as shown in the following screenshot:
The error that you defined in the Validation Pattern Message area is displayed, and it is an error since we have checked the Error indicator.