This guide will explain how to set validation rules using the “Validation” field.
Example 1:
- Initial Setup:
- Drag and drop a “Number” and a “Field Validation” field.
- Rename the fields as needed.
- Configuring The “Field Validation” Field:
- Click the pencil icon of the “Field Validation” field.
- Select the “Number” field for the “Field To Validate” option.
- Add Validation -
data-parsley-range || [1,10] || Value should be between 1 to 10
- Save the changes.
- Test The Form:
- It will only allow the input of validation value range.
Example 2:
- Initial Setup:
- Drag and drop a “Text”, a “Field Validation” and three “Hidden” fields.
- Rename the fields as needed.
- Configuring The “Field Validation” Field:
- Click the pencil icon of the “Field Validation” field.
- Select the “Text” field for the “Field To Validate” option.
- Add Validation 1-
data-parsley-type || digits || Please Enter only digits
- Add Validation 2 using the merge functionality -
{{f316-1602-5187}} || {{6545-842f-fab8}} || {{5b62-0ba4-3146}}
- Here,
f316-1602-5187
is the field ID of the Hidden field labelled “Text Field Validation”, - and
6545-842f-fab8
is the field ID of the Hidden field labelled “Text Field Validation Value”, - and
5b62-0ba4-3146
is the field ID of the Hidden field labelled “Hidden Field Validation Message”. - Save the changes.
- Configuring The First “Hidden” Field:
- Click the pencil icon of the first “Hidden” field.
- Update the value -
data-parsley-range
- Save the changes.
- Configuring The Second “Hidden” Field:
- Click the pencil icon of the second “Hidden” field.
- Update the value -
[2, 6]
- Save the changes.
- Configuring The Third “Hidden” Field:
- Click the pencil icon of the third “Hidden” field.
- Update the value -
Value should be between 2 and 6
- Save the changes.
- Test The Form:
Validation 1:
- It will only allow to input digits.
Validation 2:
- It will only allow the input of validation value range.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂