Components Validation Rules
Starting from version 3.1, user can configure validation rules for the form fields, and starting from version 4.1 validation rules are available for lists.
NOTE: One can create validation rule for one of the following field types (both object and virtual fields):
- String
- DateTime
- Rich Text
- Date
- Time
- Textarea
- Number
Choose field to create validation rule (1). Click "Add New" button (2) to open "Validation Rule" popup.
Configure validation rule for the selected component:
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 "Minimum Length" (5) for the field input (optional).
Set "Maximum 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).
NOTES:
- Regular Expression, Min Length and Max Length are optional fields, but at least one of those three should be filled in.
- Validation rule for text fields will work only if enter something there. Empty fields will not be validated.
Example:
Validation rule for text field will show "Invalid value in Sic Desc!" error message if field value contains "BB" substring. It will run only for inputs starting with "TEST" substring.
Set custom "Error Message" (8) that will be displayed under the field if validation fails.
Set start value "Minimum" (9) of the allowed date range (optional).
Set end value "Maximum" (10) of the allowed date range (optional).
Click "Add" button (11) to configure "Excluded values" 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 Values" type (13) to match your needs:
Example:
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.
Set custom "Error Message" (14) that will be displayed under the field if validation fails.
Set start value "Minimum" (15) of the allowed date range (optional).
Set end value "Maximum" (16) of the allowed date range (optional).
Click "Add" button (17) to configure "Excluded values" 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).
Configure conditions (18) using standard condition builder for validation rule to be executed (optional).
Example:
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.
Set custom "Error message" (19) that will be displayed under the field if validation fails.
Set start value "Minimum" (20) of the allowed time range (optional).
Set end value "Maximum" (21) of the allowed time range (optional).
Click "Add" button (22) to configure "Excluded values" 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 (23) using standard condition builder for validation rule to be executed (optional).
Example:
Validation rule for time field will show custom error message if user entered time value within "Excluded Values" time range.
Set custom "Error message" (24) that will be displayed under the field if validation fails.
Set "Minimum" (25) allowed number (optional).
Set "Maximum" (26) allowed number (optional).
Click "Add" button (27) to configure "Excluded values" from the allowed time range (optional).
Note: If Minimum and Maximum values are not provided all numbers are allowed to be entered except Excluded values(s).
Configure conditions (28) 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.
Add a list to the form (29).
Check "Show checkboxes" option (30).
Click "Add New" button (31) under "Validation Rules" section.
Validation rules are available only for lists with checked "Show Checkboxes" option.
Set custom "Error message" (32) that will be displayed under the field if validation fails.
Set minimum allowed number of checked rows (33) (optional).
Set maximum allowed number of checked rows (34) (optional).
Click "Add" button (35) to configure "Excluded values" from the allowed range (optional).
Note: if user checks one of the excluded records rule will show error.
Click "Add" button (36) to configure conditions (using standard condition builder) for validation rule to be executed (optional).
Example:
Validation rule will work when "Active" field = "Yes" (Condition matched) and will throw error if:
- User checked less than 3 list entries OR
- User checked more than 100 list entries OR
- User checked at least one entry with ID from the excluded values.
0 Comments
Add your comment