Validating User Input in Forms
Developers can create validation and an associated error message to check the data a user enters before processing.
About Creating Validations and Error Messages
Learn 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.
Associating a Validation with a Specific Item
Associate an item with a validation and specify error message text.
To associate an item with a validation and specify error message text:
-
View the page in Page Designer:
-
On the Workspace home page, click the App Builder icon.
-
Select an application.
-
Select a page.
Page Designer appears.
-
-
In Page Designer, select the Processing tab in the left pane.
-
Under Validating, select the validation you want to associate.
The Property Editor displays Validation attributes.
-
Under Validation, edit the following attributes:
-
Error, Error Message - Enter the text to be displayed in the event that the validation does not pass.
-
Error, Display Location - Select where the error message displays for this validation. Validation error messages display on a separate error page, or inline with the existing page. Inline error messages display underneath the associated item label or in a notification area defined as part of the page template.
-
Error, Associated Item - Select the item where this validation error message displays. .
Tip: To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.
-
-
Click Save.
About the Error Message Display Location
Learn about 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.