Components Validation Rules

User can create validation rule for one of the following field types (both object and virtual fields):

  • String

  • DateTime

  • Rich Text

  • Date

  • Time

  • Textarea

  • Number

Select field (1) to create validation rule for and click "Add New" button (2):

Configure validation rule for the selected field:

Text field (String, Rich Text, Text Area field types):

  • Set custom error message (3) that will be displayed under the field if validation fails.

  • Configure regular expression (4) to validate field input (optional).

  • Set min length (5) for the field input (optional).

  • Set max length (6) for the field input (optional)

  • Click "Add" button (7) to configure conditions using standard condition builder for validation rule to be executed (optional).

NOTE: Regular Expression, Min Length and Max Length are optional fields, but at least one of those three should be filled in.

Example:

Validation rule for text field will throw "Invalid value in Sic Desc!" error message if field value contains "BB" substring. It will only run for those inputs starting with "TEST" substring.

Date/Datetime field:

  • Set custom error message (8) that will be displayed under the field if validation fails.

  • Set start value (9) of the allowed date range (optional).

  • Set end value (10) of the allowed date range (optional).

  • Click "Add" button (11) to set values to be excluded from the allowed date range (optional).

Note: If Minimum and Maximum values are not provided all dates are allowed to be entered except Excluded date(s).

  • Click "Add" (12) button to configure conditions (using standard condition builder) for validation rule to be executed (optional).

  • You can choose excluded value type to match your needs:

Example for Date field:

Validation rule for date field will show "Invalid date entered!" error message if:

  • User entered the date not within specified date range OR

  • Entered date value is within the range, but weekday is Wednesday.

Example for Datetime field:

Validation rule for DateTime field will show "Please enter correct date!" error message if:

  • User entered the date which is earlier than March 1, 2020 11 AM OR

  • Entered date value is within May, 2020.

Time field

  • Set custom error message (13) that will be displayed under the field if validation fails.

  • Set start value (14) of the allowed time range (optional).

  • Set end value (15) of the allowed time range (optional).

  • Add values to be excluded (16) from the allowed time range (optional).

Note: If Minimum and Maximum values are not provided all time values are allowed to be entered except Excluded values(s).

  • Configure conditions (17) using standard condition builder for validation rule to be executed (optional).

Example:

Validation rule for time field will throw custom error message if user entered time value within Excluded values time range.

Number field:

  • Set custom error message (18) that will be displayed under the field if validation fails.

  • Set min allowed number (19) (optional).

  • Set max allowed number (20) (optional).

  • Add values to be excluded (21) from the allowed range (optional).

Note: If Minimum and Maximum values are not provided all numbers are allowed to be entered except Excluded values(s).

  • Configure conditions (22) using standard condition builder for validation rule to be executed (optional).

Example:

Validation rule for number field will throw custom error message if:

  • user entered one of the static type "Excluded values" (5 or 10 or 15) OR

  • user entered number between 100 and 150 OR

  • user entered negative value.

Last updated