Field Constraints feature is part of KWizCom Modern Forms (Standard edition).
With the Field Constraints feature you can easily configure field-validation rules to enforce input patterns according to your required form logic: Email, field length, IP address, zip code value ranges and any other custom pattern. These field validation rules are processed when a user saves the form (New Item or the Edit Item form).
Validate a field value comparing to a regular expression.
Manage and share custom validation rules across your organization.
Dynamic validation rules: validation rules that are conditionally applied, depending on values of other fields and current user
This will open the Field Constraints settings page:
This settings page allows you to create field validation rules, which are validated when user submits the form.
Setting up a field validation rule:
1. Select a column that you wish to validate in the “Show rules for” drop-down:
2. Create a new rule by clicking the“+new rule” button. A new rule definition section will appear:
3. Select a field validation operator in the "Validate value" drop-down, the value you wish to validate and type the error message you want to be displayed when the rule fails to pass the validation rule. example: in the following screenshot the "Upsell Amount" field is validated to have a value greater than $1,000:
4. Setup conditions by clicking the "+add condition" button. These conditions define when the field validation rule should be validated. You can create several conditions with AND/OR operator between them, as you can see in the following screenshot:
5. Save the rule by clicking “Apply” or “Save”.
You can delete the rule by clicking the "delete" icon which appears on the right side of the rule. To edit an existing rule, click the “expand” icon appearing on the right side of of te rule.
When validating text fields, there’s an additional operator that you can use called “matches pattern”:
The “matches pattern” operator offers a list of various input patterns that you can use to validate such as email, phone number, postal code etc. These patterns are based on regular expressions that you can update and you can also add new custom patterns.
To update an existing custom pattern or create a new one, click the "edit patterns" button:
The Regular expressions editor popup will appear:
Select the pattern you want to edit, or type a new custom pattern name that you wish to create. In the following screenshot we've selected the "Phone Number" pattern:
Now you can update the regular expression that defines this pattern and also test your pattern by typing a value in the "Test value" property.