Previous
Previous
 
Next
Next

Validating User Input in Forms

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:

Creating a Validation

To create a validation:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Validations, click the Create icon.

  3. When the Create Validations Wizard appears, follow the on-screen instructions.

    Validation Types are divided into two categories:

    • Item. These validations start with the term Item and provide common checks you may want to perform on the item with which the validation is associated.

    • Code. These validations require that you provide either a piece of PL/SQL code or SQL query that defines the validation logic. Use this type of validation to perform custom validations that require verifying values of more than one item or accessing additional database tables.

  4. Follow the on-screen instructions.


Note:

Validations cannot contain more than 3,950 characters.

Associating a Validation with a Specific Item

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

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Validations, select the validation item you want to associate.

    The attributes page for the validation appears.

  3. Scroll down to Error Message:

    • In Error message display location, verify the display location.

    • In Associated Item, select the item you want to associate with this validation.

  4. Click Apply Changes.

About Error Message

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.