Show TOC

Background documentationValidation Rules Dialog Box Locate this document in the navigation structure

 

You use the Validation Rules dialog box to define rules that check the validity of values entered into specific controls at runtime and display error messages when the validation fails.

You display the Validation Rules dialog box by selecting a control on the Layout board and clicking the browse button next to the Rules field in the Validation group in the Configure Element task panel.

Note Note

The Rules field in the Validation group in the Configure Element task panel is enabled only when you have selected a control that is bound to a field. You bind a control to a field in the Define Data dialog box.

More information: Define Data Dialog Box

End of the note.

The Validation Rules dialog box contains the following items:

Item

Description

Add Row

Adds another row to the list. You can then define the condition and value against which you want to validate the control at runtime.

The control value must pass all the validation conditions defined in all the rows of the Validation Rules dialog box to be successfully validated.

Delete Row

Removes the highlighted row from the list.

Move Up

Moves the highlighted item one place up in the list, changing the order in which the validation rules are applied.

Move Down

Moves the highlighted item one place down in the list, changing the order in which the validation rules are applied.

Condition

The condition according to which to validate the field value. The available conditions depend on the field type.

String

  • Is equal: The field value exactly matches the value defined in the Value field

  • Is blank: The field value is empty

  • Contains: The field value contains the value defined in the Value field

  • Starts with: The field value starts with the value defined in the Value field

  • Ends with: The field value ends with the value defined in the Value field

  • Not equal: The field value exactly matches the value defined in the Value field

  • Not blank: The field value is not empty

  • Does not contain: The field value does not contain the value defined in the Value field

  • User defined: The field value is validated according to the condition defined in the Value field

Boolean

  • Is true: The field value is true

  • Is false: The field value is false

  • User defined: The field value is validated according to the condition defined in the Value field

Number

  • Is equal: The field value is the same as the value defined in the Value field

  • Is smaller: The field value is less than the value defined in the Value field

  • Is greater: The field value is greater than the value defined in the Value field

  • Not smaller: The field value is equal to or greater than the value defined in the Value field

  • Not greater: The field value is equal to or less than the value defined in the Value field

  • Not equal: The field value is not the same as the value defined in the Value field

  • User defined: The field value is validated according to the condition defined in the Value field

Date/Time

  • Is equal: The field value is the same as the value defined in the Value field

  • Is earlier than: The field value is chronologically earlier than the value defined in the Value field

  • Is later than: The field value is chronologically later than the value defined in the Value field

  • Not equal: The field value is not the same as the value defined in the Value field

  • User defined: The field value is validated according to the condition defined in the Value field

Value

The value against which to validate the control at runtime. You can enter a value, select a field from the dropdown list, or choose Define expression from the dropdown list to define a value using the Dynamic Expression Editor dialog box.

The Value field is not relevant if the selected condition is Is blank, Not blank, Is true, or Is false.

Error Message

The error message to be displayed at runtime if the control fails validation. The way in which the error message is displayed depends on the specific runtime implementation.