11.5 Validating User Input in Forms

This section describes how to validate user input in forms.

11.5.1 About Creating Validations and Error Messages

You can use validations to check data a user enters before processing. Once you create a validation and the associated error message, you can associate it with a specific item. You can choose to have validation error messages display inline (that is, on the page where the validation is performed) or on a separate error page.

Creating an inline error message involves these steps:

  • Step 1 - Create a validation and specify error message text. To learn more, see "Understanding Validations."

  • Step 2 - Associate the validation with a specific item.

11.5.2 Associating a Validation with a Specific Item in Page Designer

To associate an item with a validation and specify error message text:

  1. Navigate to the appropriate page in Page Designer. See "Viewing a Page in Page Designer."

  2. In Page Designer, select the Processing tab.

  3. Under Validating, select the validation item you want to associate.

    The Property Editor changes to Property Editor - Validation.

  4. Click the Collapse All icon and then select Show All from the Property Editor Menu.

  5. Expand Error and configure the following:

    • Error Message - Enter or edit the error message.

    • Display Location - Identifies where the validation error message displays. Verify the display location.

    • Associated Item - Select the item you want to associate with this validation.

  6. Click Save.

11.5.3 Associating a Validation with a Specific Item in Component View

To associate an item with a validation and specify error message text:

  1. Navigate to the appropriate page in Component View. See "Viewing a Page in Component View".

  2. Navigate to the Edit Page Validations page. Under Validations, select the validation you want to associate.

    The attributes page for the validation appears.

  3. Scroll down to Error Message.

  4. In Error Message:

    • Error Message - Enter an error message.

    • Error message display location - Identifies where the validation error message displays. Verify the display location.

    • Associated Item - Select the item you want to associate with this validation.

  5. Click Apply Changes.

11.5.4 About the Error Message Display Location

The error message display location identifies where a validation error message displays. Validation error messages can display on an error page or inline within the existing page. Inline error messages can display in a notification area (defined as part of the page template) or within the field label.

To create a hard error that stops processes, including any remaining validations, you must display the error on an error page.