Creating Validation Rules - Zoho Desk Knowledgebase

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 digits, a message will pop up, notifying you of the error. You must re-enter the phone number correctly to be able to submit the form. This is called form validation — one of the easiest ways to ensure data accuracy as part of your data collection process.

When it comes to customer service, you need accurate data to provide a precise solution. Any conclusion drawn based on inaccurate data can slow you down when you have more important activities to deal with. Validation rules in Zoho Desk help you overcome this problem by arresting incorrect data even before it can enter your help desk.

Availability
Permission Required
  1. Users with Profile permission to Manage Layouts and Fields can access this feature.
  2. Users can create a maximum of 50 validation rules per department.

Basics of Validation Rules
  1. Validation rules enable you to validate value for a particular field to ensure that you receive the data you expect and that it is in the proper format.
  2. When the data entered in records do not meet the standards, you can include error messages to display to users. This way, you can ensure that everyone contributes to quality data.
  3. A validation rule for a field can consist of conditions like whether a value needs to be filled in, a specific expression it shouldn't contain, the minimum and maximum length of the data, whether it needs to start or end with something, or if it shouldn't be empty.
  4. Example:  You want the passport number of travelers when their travel type is "International." If you were to set this validation rule in Zoho Desk, the essence of it would be the following:
    1. Layout: Tickets | Primary field - Passport number | Secondary field - Travel Type
    2. Condition: When "Passport Number is empty"  and "Travel Type is International."
    3. Error to be displayed: "Sorry! Passport Number cannot be incomplete if Travel Type is International".

Note:
  1. Admins can select multi-select picklist field while creating a validation rule. For example, Admins can create a validation rule for a "Service Topics" multiselect picklist field to ensure customers select at least one topic when submitting tickets. If a customer tries to submit a ticket without choosing any service topics in help center, the validation rule would prompt them to make a selection before proceeding. 
  2. Regex criteria's such as Matches RegexNot Matches Regex, and Contains Regex can be selected while creating a validation rule. Consider a scenario in which an admin creates a validation rule for a field called "Order Number" using Regex criteria to maintain a specific format. The goal is to ensure that order numbers consist of alphanumeric characters, like "ORD123." In this case, the admin can employ the "Matches Regex" criterion within the validation rule, enforcing the necessity for alphanumeric input in the order number field. This ensures that users, when entering order numbers, adhere to the specified format. 
  3. To enter some value, don't use text field validation. Check the "Mark as required" field instead.

Creating a Validation Rule

To create a validation rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, select the desired module and the department (when more than one exists) from the drop-down menu.
  5. Click Create Rule in the upper-right area.
  6. In the Create Validation Rule pop-up window, do the following:
  7. Choose the field and define the primary condition to initiate the rule.
    For instance, if you want to validate the passport number field, so it is filled for international travel, your primary condition will be, "Passport Number <is empty>."




  8. Click Next.
  9. In the Validation Rule Editor, enter the alert message that should be thrown for records that meet the condition. Note that this error message will be displayed for all the records that meet the criteria.
    Example: "Sorry! Passport Number cannot be incomplete if Travel Type is International".
  10. Move your mouse over a Secondary Condition and click Edit icon (  ), when you have to create multiple conditions.
    As per our example, you can enter "Travel Type" as "International" as an additional condition in the validation rule.




  11. Click the Plus icon (  ) to define multiple secondary conditions and specify the appropriate alert message.



  12. Click Add another option to change the value of the primary field and configure different alert messages as required.
  13. Check Apply to Help Center to validate tickets submitted through your help center.
  14. When you're done, click Save.

Points to Remember
Here are some points to keep in mind while creating validation rules:
  1. Following is the split-up of the number of conditions you can create within a validation rule.
    1. 10 Parent Conditions per rule
    2. 5 Secondary Conditions per parent condition
    3. 5 criteria per secondary condition
  2. Validation rules are department-specific. This means, under a single module, say Tickets, you can configure different validation rules on the same field for different departments.
  3. Validation rules are executed in the order in which they have been created.
  4. If a primary field or a secondary field used in a validation rule gets updated via one of the following means, this field update takes precedence. Which means, the validation rule gets overwritten by the field update.
    1. Import: Updated on importing new tickets or overwriting existing records
    2. Workflow Rules: Updated as a result of workflow action
    3. Blueprint: Updated as a result of the After Transition settings
    4. APIs: Updated via the API method
    5. Web Forms: Updated as a result of submitting form
  5. The primary fields used in a validation rule will not be available for mass updates.
  6. The primary field used in a validation rule must be visible on the Help Center to validate tickets submitted through it.

Deactivating Validation Rule
You can activate or deactivate validation rules at any time. When you deactivate a rule, it is labeled as Inactive. Validation rules can be reactivated when needed.
To deactivate rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, click the toggle corresponding to the validation rule to OFF.



  5. Click Deactivate to confirm.

Deleting Validation Rule
Validation rules can be deleted when not in use. When you delete a rule, it will be permanently removed from your help desk and cannot be recovered.
To delete rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, move you mouse pointer to the rule you want to delete and click the Delete (  ) icon.
  5. Click Yes, Delete to confirm.

Notes:
  1. When you delete a validation rule, the rule and the alert message associated with it will be deleted.
  2. When you attempt to delete a field associated with a validation rule, you will be prompted first to delete the rule, after which you are free to delete the field.


    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

                                                                                                              • 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: Validation Rules

                                                                                                                How to create validation rules? To create a validation rule in Zoho Desk, follow the steps given below: Go to Setup > Customization > Layouts and Fields > Validation Rules. In the Validation Rules page, select the required module and the department ...
                                                                                                              • Creating Workflow Rules

                                                                                                                Workflow Rules are a set of actions (alerts, tasks, field updates and custom functions) that are executed when certain specified conditions are met. These rules automate the process of sending email alerts, assigning tasks and updating certain fields ...
                                                                                                              • Assigning Tickets using Workflow and Assignment Rules

                                                                                                                We are opening the 'Agent level threshold' on a request basis. Kindly raise a request using the Early Access Form. Availability Permission Required Users who have the Help Desk Automation permission enabled in their profile can create workflows and ...
                                                                                                              • Zia - Field Predictions

                                                                                                                Better customer service that eventually results in long-term engagement and builds stronger relationships with the customers is an asset that every business wants to invest in. While on the surface, customer support service may seem just about ...
                                                                                                                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