Data Validation for text fields

Data Validation for text fields

In general, a text field accepts any type of character as an input. However, when data validation is enforced, it ensures that the sender gets the right input from the signer. Zoho Sign offers two options: standard validation and custom validation.

Standard validation

These are the predefined options which can be found under the validation drop-down menu. Some of the standard data validation options are as follows:

Validation Option
Signer Field's Data Format
Numeric
Numbers 0-9 with no spaces.
Alphabet
Letter A-Z in both upper and lower cases and spaces.
Email
There is no specific validation for the email entered by the signer. The minimalistic entry of "@" and '"." is checked. Some special characters are also allowed.



Custom Data Validations

If the sender has a specific requirement that can't be met with the standard validation options, the custom data validation option can be chosen. Custom data validation allows users to create a more specific validation pattern based on the sender's requirement. 

How to apply custom validation
  1. Drag and place the text fields in the same manner done for standard validation process.
  2. Left-click inside the text field to open its property and under the validation drop-down menu, select custom.
  3. In the Regex text field, type the needed expression.



A regex is a sequence of characters that specifies a search pattern, usually used for input validation. 

Regex
Data Format
\d
Atleast one number. (eg. abc1d)
^\d$
Exactly one number (0-9)
^\d{4}$
Exactly four numbers.(0-9)
^[0-9]+$
Only numbers(0-9)
^[a-z A-Z]+$
Only alphabets with spaces (A-Z, a-z)

Examples


^[2-9]\d{2}-\d{3}-\d{4}$
Can be used for hyphen separated US phone numbers. YXX-XXX-XXXX, where Y is a number between 2-9 and X is a number between 0-9.
eg: 922-414-2222)
^\d{5}(?:[-\s]\d{4})?$
Zip code regex that matches three types of zip codes.
eg: 12345 or 12345 6789 or 12345-6789.
Other values will not be allowed.
^[A-Z]{5}[0-9]{4}[A-Z]{1}$
Can be used if the recipient needs to add a PAN as the input,
^[a-z A-Z]{1,10}$
Alphabets which have minimum 1 letter and max 10 letters (with space). This will be useful if the sender wants to restrict the field length.
^Trail$
This will allow the signer to fill only the mentioned text. If either or option needs to be given to the signer, the words can be seperated with |
Eg: ^Trail|Standrad|Enterprise$ - This is will give the signer the option to type the text from the given three options


  1. In the error prompt text box, enter the text that would guide the recipients to enter the data in the correct manner, which will be displayed to the signer when the entered data is an invalid or undesirable format.