Adding Form Field Validation
To add form field validation you have to go to your form builder and go to the field properties of the field on which you want to apply validation.
In the example below I am using email field validation.
Once you have selected the validation you can either use the default error message or customize it to your preference. This error message will be shown in case a user inputs a wrong value.
In case the user enters a wrong value for a field in which validation is applied, they will be shown the error message. As is evident in the image below, the user gets an error message when they input a number in a field that asks for the email address.
Type of Field Validations Available in Crove
The following types of field validations are currently available in Crove:
- Email Address
- Phone Numbers
- Numbers Only
- Alphabets Only
- Alphabets with Spaces
- Alphabets and Numbers
- Custom Regex String
Adding a Cutom Regex String in Form Field Validation
To add Custom Regex, choose the last option in the select validation dropdown.
In the example below, I have set up a custom regex string as field validation, any input in the field will only work if it has the word “Crove” in it, otherwise, it will show the custom error message that I have set.
This is how the custom error looks like.
This is how the correct input looks like.
If you are new to regex you can learn more here.