FAQs: Validation Rules

FAQs: Validation Rules

What is a validation rule?
Validation rule provides businesses a way to ensure that the data entered by the customers and the employees is correct and meets their standards. It helps maintain data authenticity. When customers submit tickets or agents create tickets on behalf of the customers, they enter certain values into the fields. Businesses can ensure the entered values are accurate by setting a validation rule. Likewise, when agents enter data, such as product code, serial IDs, and customer details, these values can be authenticated using a validation rule.

Benefits of the Validation rule include:
  1. Ensuring data accuracy - The data entered meets the business requirement, thereby ensuring the accuracy of the information provided.
  2. Advanced validation with regex - Regex is used in a validation rule to check the given input against a pattern used to match and search text based on specific patterns. 
  3. Reduces manual tasks - When a validation rule is set up and the data entered adheres to the specified criteria, the users do not have to manually verify the information provided. 
  4. Customer experience - By setting a validation rule, clear guidelines or requirements can be communicated to the users filling out a form, thereby facilitating a smoother experience in entering their information.
Let's explore how validation rules are used in the Banking department to ensure accuracy and security. 
  1. Credit Card Transactions: When you make a purchase with your credit card, validation rules can check if the transaction amount is within your credit limit and if the card number is valid before approving the payment.
  2. Net banking User ID: When you set up a new password for net banking, there could be a criteria that only your Customer Id or mobile number must be used as the User ID. Setting up a validation rule ensures that the provided value meets this criteria.
  3. Online Banking Passwords: When you set up a new password for online banking, validation rules may require a minimum/maximum length including special characters, or a combination of letters and numbers to ensure that the password is strong enough to protect your account.
  4. Account Numbers: When you enter your account number for payments, validation rules verify that the value entered matches the bank's standard and that the account exists before processing the transaction.
These rules help maintain the integrity and security of your financial transactions, providing a reliable and safe banking experience.
Based on the example above, let's create a validation rule that the account number can only have numeric values.



In this way, if there are no numbers entered or if there are any alphabets entered, an alert is displayed that they should enter only the numeric values. 
The validation rule could be a combination of multiple conditions. You can limit the data provided by using the logical operators (and/or) and Regex expressions as well. 




How to create validation rules?
To create a validation rule in Zoho Desk, follow the steps given below:
  1. Go to Setup > Customization > Layouts and Fields Validation Rules.
  2. In the Validation Rules page, select the required module and the department from the drop-down menu.
  3. Click Create Rule.
  4. In the Create Validation Rule page, do the following: select a layout and the field to be validated.
  5. Click Add Option to define the primary condition to initiate the rule
  6. Specify the required criteria to be validated and click Next.
  7. In the Alert message field, enter the alert message to be displayed if the value entered in the primary field doesn't match the specified criteria.
  8. Hover on the Secondary Condition and click the Edit icon if you want to create multiple conditions.
  9. Click the + icon to add multiple secondary conditions and click Done.
  10. Click Add another option to add another primary field to be validated and enter the alert messages as required.
  11. Select the Apply to Help Center checkbox to validate tickets submitted through the help center.
  12. Click Save once the required fields are added in the validation rule.

Is it possible to create more than one Validation rule for the same Primary field?
The Validation rule in Zoho Desk ensures that the information provided by the customers are in a specific criteria or pattern. Validation rules could be added for any modules and departments in an organization. An error is displayed when the information doesn't match the requirements.

A field in a layout for which you want to create a specific rule is called a primary field. 

For example, if you want the account number field in a banking layout to have a specific rule that the account number should have only numeric values, then the Account number field is considered as the Primary field. 

The first step of configuring a Validation Rule is to select a Primary field. 

Once the primary field is selected and the required validation rule is added, the primary field becomes the foundation of the rule. 
It is not possible to create more than one Validation rule for the same Primary field, as it could overlap the other rule. 
What is Regex and how to use it?
Regex is a pattern-matching language that is used to match and search text based on specific patterns or rules. With this new functionality, you can create rules that require specific patterns to be followed in input fields, such as phone numbers, email addresses, and more. This not only helps ensure accurate data collection but also saves time and effort in the data processing.
Benefits of using regex include:
  1. Increased Efficiency: Regex can help you find specific patterns in large datasets more quickly.
  2. Improved precision: Regex empowers you to define your search criteria precisely, minimizing the risk of missing or misinterpreting data.
  3. Great Reusability: The created regex pattern can be reused in different contexts.
There are three comparator provided for Regex : 
  1. Matches Regex
  2. Not Matches Regex
  3. Contains Regex
For more information on how to use regex, refer to the Regex in Layout and Validation Rules KB. 

What is the purpose of setting a Criteria Pattern in a Validation rule?
Assume that you want to validate a field using all the possible criteria. For example, the Phone number field.

If a bank is handling customer support in India, they should validate if the customer's phone number is valid. 

To validate this, they need multiple conditions in the same field. In this case, they can provide the primary field as Phone Number, then the secondary condition as 'Country is India', and the next criteria in the secondary condition as 'Number should start with +91'.

In this way, multiple conditions and criteria are used for the same rule, enhancing the automation process.
What is the purpose of adding Matches Regex as a validation criteria and providing an alert message?
Assume you want the customers to fill out the SWIFT/BIC code of their bank account. Swift Code is an 8-11 alphanumeric character code structured in a standard format from left to right as: Bank code (four letters abbreviating the bank's name) Country code (two letters representing the country) Location code (two letters or numbers for the bank's head office). 

If you do not want any other structure and if there is a possibility that the order could be changed, something like Country code, Bank code, and Location code, you can add this custom pattern and select the criteria as Not matches Regex. So if the entered value matches the pattern you have provided, then an alert message could be displayed that it is an incorrect format. 
Is it possible to create a custom pattern in Regex or can we only choose from the Regex Gallery in Zoho Desk?
Yes, you can create a custom Regex pattern in Zoho Desk.
Note: Regex is only supported in primary condition for the time being.
Follow the steps given below to add a custom Regex pattern:
  1. Navigate to Setup > Customization > Layouts and Fields > Validation Rules
  2. In the Validation Rules page, select the required module and the department from the drop-down menu.
  3. Click Create Rule.
  4. In the Create Validation Rule page, do the following: select a layout and a field.
  5. Click Add Option to define the primary condition to initiate the rule.
  6. Specify the required field to be validated.
  7. In the validation field, select Matches Regex, or Not Matches Regex, or Contains Regex.
  8. In the Custom Pattern text box, enter the pattern you want to validate. It could be a combination of alphanumeric characters.
  9. Once you enter the custom pattern, click Done and click Save.

How can I create a rule to ensure that only numerical digits are allowed in an account number field?
In specific business situations, such as online payments or banking, agents may need to enter numbers into the account number field. To ensure accuracy, a validation rule can be implemented: if the account number contains any characters other than numbers, an alert message should be displayed.
You can create a validation rule in the following format:
  1. Navigate to Setup > Customization > Layouts and Fields > Validation Rules.
  2. In the Validation Rules page, select the required module and the department from the drop-down menu.
  3. Click Create Rule.
  4. In the Create Validation Rule page, do the following:
    Select a layout and the Account Number field, click Add Option to define the primary condition to initiate the rule.
  5. Specify the required criteria to be validated as Account Number Not Matches Regex and the pattern as Numbers Only, then click Next.
    Note: You can edit the pattern according to your requirements.
  6. In the Alert message field, enter the alert message to be displayed if the value entered in the primary field doesn't match the specified criteria.
  7. Hover on the Secondary Condition and click the Edit icon if you want to create multiple conditions and click Done.

Is mass update possible for a field that is a part of the validation rule?
If a field, such asResolution Time, is a part of the validation rule, it cannot be updated as a part of the mass update option as it could result in the failure of the rule.

Validation rules are layout specific. Assume that the Account number field is reused in multiple layouts. The expectation or the requirement of this field in each layout could be different. 

When you do a mass update, there could be 100 tickets with the same field, out of which 10 is from Layout 1, 50 from Layout 2, and 40 from Layout 3. At this stage, the same field cannot be validated for all three layouts. This could result in failure of the rule.

Is it possible to select the current date in the date field using a validation rule?
Relative dates are not possible for the time being. We will make an announcement post if the feature is developed in the future. 
Is there any word limit for the Alert message entered in the validation rule?
The maximum character limit is 150 for the alert message. 
How do I validate the values entered in other fields along with the primary field?
The Validation rule in Zoho Desk ensures that the information provided by the customers is in a specific criteria or pattern. Validation rules can be added for any modules and departments in an organization. An error is displayed when the information doesn't match the requirements. 

A validation rule validates the input given in a single field. That field is known as the primary field.

The primary field's validation can depend on the inputs given in other fields of the form.

How to use the validation rule for the data entered in the help center?
While creating a validation rule, you can see the Apply to Help Center option at the bottom of the page. 

If a user is raising a ticket from the help center, and you want the entered data to be validated, then select the Apply to Help Center checkbox.
The criteria provided in the validation rule will be validated in the tickets submitted from the Help Center as well. 
Is it possible to filter/select the layout and the validation rule based on the layouts?
Yes, in the validation rules page, you can select the Modules and Departments from the top.
Whereas, you can also filter the available rules based on their layout. 

To do that,
  1. Navigate to Setup > Customization > Layouts and Fields > Validation Rules
  2. In the Validation Rules page, select the required module and the department from the drop-down menu.
  3. From the list of available rules, select the All Layouts drop-down and choose the required layout.
The rules created in the specific module, department, and layout are displayed. 
Can I add multiple secondary conditions?
Yes, you can add five secondary conditions per parent condition and five criteria per secondary condition. The alert message can be defined for each secondary condition and its criteria. 


Is there any word or letter limitation to the values we provide while adding a secondary condition for the fields that don't have fixed inputs/drop-down?
The maximum character limit is 1000 for the values entered in the criteria pattern.  

What happens if I remove a field from a layout that’s set as the Primary field in a validation rule? Will this cause an error in the validation rule?
When you remove a field from a layout, the field will be listed under the unused fields in the layout to be used later. An unused field can also be used in another layout. If this field is used to create a validation rule, then disabling the system will prompt you to confirm whether the associated rules can be disassociated. Upon confirmation, the rule will be disabled. 

To remove a field, right-click on the field from a layout and click Remove.  

Can I disable the validation rule?
Consider a scenario in which an organization provides customer support for a specific brand (say XYZ). They create a validation rule that the support emails must include the brand name, such as chris@xyz.com. Only emails that contain the brand name will be considered for support. 

However, if the organization decides to expand its support services beyond a single brand, they can simply deactivate this validation rule.

To disable a validation rule
  1. Navigate to Setup > Customization > Layouts and Fields > Validation Rules
  2. In the Validation Rules page, toggle the validation rule you want to disable. 
  3. Click Deactivate to confirm.
When a rule is deactivated, it will be labeled as Inactive.
Can I delete a validation rule?
Yes, it is possible to delete a validation rule. Here is how you can do it:
  1. Navigate to Setup > Customization > Layouts and Fields > Validation Rules
  2. In the Validation Rules page, click the delete icon corresponding to the validation rule.
  3. Click Yes, Delete from the pop-up to proceed with the deletion.
Please note that the validation rule, along with the criteria and alert messages, will be deleted, and it cannot be retrieved once deleted. 





    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION









                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Creating Validation Rules

                                                                                                                Go to any website with a registration form, and you will notice that they provide you feedback when you don't enter your data in the format they are expecting. For example, when the phone number field on a form is not filled in or does not contain 10 ...
                                                                                                              • FAQs: Workflow Rules

                                                                                                                What is a workflow Rule and why do we need it in Zoho Desk? Workflow rules are used to automate and streamline the support processes, ticket management, and customer interactions. They help ensure consistent and efficient handling of tickets and ...
                                                                                                              • FAQs: Assignment Rules

                                                                                                                What is an assignment rule and why do I need it? Assignment rule is an automation tool that lets the support administrator automate the process of assigning tickets to agents. Customer support is a crucial job, and timely and effective resolution of ...
                                                                                                              • Regex in Layout and Validation Rules

                                                                                                                Regular expressions (regex) are a sequence of characters that define a pattern. They are used to find and match similar patterns in a piece of text. In other words, regex is a set of strings that holds a particular pattern. It is commonly used to ...
                                                                                                              • FAQs: Working on Tickets

                                                                                                                What are Tickets Tabs in Zoho Desk? Tickets Tabs in Zoho Desk are designed to organize and provide contextual information about support tickets within the help desk system. These tabs enable users to connect tickets with other standard modules of ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources