Last Updated: Dec 28, 2022
Validation is the process to ensure that data is entered into a field correctly. The value entered for the field is the right data and in the right format.
In Customer Detail Form, you must validate if the email id entered is a valid email id. .
- Must contain '@' and '.' character.
- There must be at least one character before and after '@'.
- There must be at least two characters after '.' (dot).
Common validations done are:
Validations can be performed using the User-Defined functions. To know more about User-Defined functions, click here.
A field can have one or more validations based on the requirement, or none.
Only functions with Validation type are listed in Select function from Jiffy drop-down while adding the Validations.
To validate an Email id field, the following Python code is written. If validation criterion not met, error message ‘Invalid email’ is returned.
You can add the validations for each field in the form.
Number of parameters to be passed varies based on number of parameters defined in the User-Defined function. E.g if the function selected has two parameters defined then two placeholders will be displayed.
Validations are applicable only for Jiffy tables and not for Doc tables.
Fields in the form are validated as per the business requirement.
If the validation rules set in the user-defined functions are not met for the field, the error messages returned by the functions are displayed under the respective fields on the click of the Save button in the form.
In Customer Detail Form, if Email id is not entered or does not meet the validation rules set in the User-Defined function EmailValidationCheck, the error message 'Invalid Email' returned is displayed under Email field on click of the Save button.