Working with HTML Forms
Steps for Applying Validation Rules to a Form Field
To apply a validation rule to a form field, follow these steps.
- Perform steps 1-4 in Creating a Form's Content Block.
- Insert a text field, text area field, or a selection list.
- Click the form element you just inserted so that it is surrounded by small squares.
- Click the Set Validation button ( ) from the form element toolbar.
- The Form Validation Rules window opens.
The following table explains validation rules, and the fields to which you can apply each rule.
- Enter an error message. This message appears if the user's input does not conform to the validation rule.
Tip!If you apply validation rules to more than one field, include the field name in the error message. For example, enter The name field only allows text. This is good practice because error messages only appear after the form is submitted and, if the message does not identify the field, the user may be unable to identify which field needs correction.