Show TOC

Validating User InputLocate this document in the navigation structure

Use

When users choose the Save function in Edit forms, the system carries out the following checks:

  • Mandatory fields

    The system checks whether all mandatory fields contain data.

  • Data types

    The system checks the format of entered data (for example, for the data type URL ).

    In the case of some data types, the system also checks that relevant items exist (for example, for the data type User ).

  • Data lengths and patterns

If entries are incomplete or invalid, the system prevents the user from saving the data, highlights the incorrect fields, and displays texts pertaining to the errors in question.

The way in which fields with errors are indicated corresponds to the portal default. You can select a format in the properties of input fields (in the Error Format property).

The user can only save the contents of the form when all errors have been corrected.

Procedure

Defining Mandatory Fields

You can define the following fields as mandatory fields:

  • Single-line input fields

  • Multi-line input fields

  • Single-line input fields with input help (browser control)

To define an input field as a mandatory field, select it and then set the Required property to Yes.

Defining Data Types

Defining Data Lengths and Patterns

You can define the minimum and maximum data lengths for schema elements with the data type String , and you can use patterns to restrict the valid value sets.

For more information, see Defining Data Lengths and Patterns .

Entering Error Texts

  • In the Error Text property for the form, enter a text that you want to be displayed using the Edit form.

  • In the Error Text property for the individual input fields, enter a text that you want to be displayed immediately below the field in question.

  • At validation, the system generates error texts that are also to be displayed immediately below the field with an invalid entry. Use the Validation Error Text property for input fields to define whether the system should display the error text that you entered manually, the validation error text, or both.

Linking Field Labels with Corresponding Input Fields

This is a prerequisite for the following functions:

  • The system displays an indicator (for example, an asterisk) next to the field labels of mandatory fields.

  • If errors occur, the system highlights the field label as well as the input field in question.

To check whether or not a field label and input field are linked, use the primary mouse button to click the field label in the Edit form.

To link a field label with an input field, proceed as follows:

  1. Use the secondary mouse button to click the field label.

  2. Choose Link to Control. .

  3. Click the input field.