Validation rules on form fields

Starting with work-Relay v. 3.1, user can configure validation rules for the form fields.

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

  • Date
  • DateTime
  • Time
  • Number
  • String
  • Textarea
  • Rich Text

Select (1) field to create validation rule for. Click "Add New" button (2) in "Validation Rules" section at the left sidebar.

Configure validation rule for the selected field:

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

1. Set custom error message that will be displayed under the field if validation fails.

2. Configure regular expression to validate field input (optional).

3. Set min length for the field input (optional).

4. Set max length for the field input (optional)

5. 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 field:

1. Set custom error message that will be displayed under the field if validation fails.

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

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

4. Add 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).

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

You can choose excluded value type to match your needs:

Example:

Validation rule for date field will throw "Invalid date entered!" error message if user entered the date not within specified date range. It will also through an exception if date value is within the range, but weekday is Wednesday.

Time field

1. Set custom error message that will be displayed under the field if validation fails.

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

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

4. Add values to be excluded 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).

5. Configure conditions 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:

1. Set custom error message that will be displayed under the field if validation fails.

2. Set min allowed number (optional).

3. Set max allowed number (optional).

4. Add values to be excluded 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).

5. Configure conditions 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 values in Excluded static values (5 or 10 or 15), entered number between 100 and 150, or entered negative number.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.