Validation Rule | Online Help - Zoho CRM

Working with Validation Rules

One of the most challenging tasks in CRM system is ensuring the validity of data in it. A poorly maintained set of data can cost a company in more ways than one - your activities are slowed down, you will have inaccurate reports and it's plain annoying to have to manually verify details of each record when you have more important activities to deal with.


Validation rules help you overcome this problem by arresting the wrong kind of data even before it can enter CRM.

Basics of Validation Rules

  • Validation rules in Zoho CRM will allow you to define the accuracy and validity of the data  that enters CRM. That is, you will define the undesirable values for a field in a validation rule. If a field value entered for a record matches the criteria defined in the rule, CRM will throw an alert and will not allow the record to be saved.
  • While defining the validation rule you can choose whether throw an alert when specific condition is met or when the condition is not met.  Example : You want the deal discounts to be 15%. You can define a validation rule in two ways:
    • Throw alert when condition is not met - User will be alerted whenever the condition is not met or the amount entered is less than 15%.
    • Throw alert when condition is met - User will be alerted whenever the discount amount entered meets the specified condition or is more than 15%.
  • The error message is customizable.  Example : You don't want deal discounts ever to be greater than 15%. If you were to set this validation rule in CRM, the essence of your validation rule would be the following:
    • "If Discount is greater than 15% throw an alert message".

      Error to be displayed: "Sorry! We don't allow a discount greater than 15%".

  • You can further drill down the rule by defining different custom error messages based on specific criteria. For instance, the discount for India should not be greater than 15%, but the discount for the UK can be upto 20%. Here you will have branch conditions for the discount fields and specify appropriate error messages. You learn more about these multiple conditions in the following sections.
Availability
Permission Required
Users need Module Customization profile permission to create validation rules.

Create a validation rule

  1. Go to  Setup  >  Customization  >  Modules and Fields.
  2. Select the module for which you want to create the validation rules.
  3. In the [Module] page, click the  Validation Rules  tab.
  4. Click  + Create Validation Rule.
  5. In the  Create Validation Rule Popup  window, perform the following actions:
    • Choose the layout  that the field you wish to validate, belongs to.
    • Choose the field  and define the primary condition to initiate the rule.
      For instance, if you want to validate the discount field to keep out discounts more than 15%, your primary condition will be,  "Discount > 15%" .

  6. Click  Next .
  7. In the  Validation Rule Editor , specify the criteria for validation.
       

  8. Select an  Execute rule  from the drop-down list.
  9. In the  Validation Rule Editor,
     enter the alert message  that should be thrown for records that meet the condition.
    Example:  Sorry! We don't allow discount greater than 15%. 

    Note that this error message will be displayed for  all the records  that meet the criteria. Which means, whenever a deal is created with more than 15% discount, this error message will be displayed.

  10. Move your mouse over to the  More  icon and click  Edit , when you have to create multiple conditions.
    For instance, sometimes you may have policies that define discounts based on the region. Say for India, the maximum discount that can be offered is 15%, but in the USA, it can go up to 20% and so on. You can define these additional conditions in the validation rule and customize the error messages as required.

  11. To  Which records would you like to apply the rule on?  select  Choose based on specific conditions.
  12. Define each condition and specify the appropriate error message.
  13. Click  Add another option  to change the value of the primary field and configure different alert messages as required.
  14. Click  Save .


  15. Now, depending on the validation rule, different error messages are displayed when the Region is chosen as UK and India.

Note
  1. If a primary field or a secondary field used in a validation rule gets updated via workflows, Blueprint, APIs, Import or Webforms, this field update takes precedence. Which means, the validation rule gets overwritten by the field update. As a consequence, CRM will accept the value entered a result of the field update over the validation rule. Learn more about the consequences  here .
  2. Following is the split up of number of conditions within a validation rule.
    1. 10 Parent Conditions per rule
    2. 5 Child Condition per parent condition
    3. 5 criteria per child condition
  3. Validation rules are layout-specific. This means, under a single module, say Leads, you can configure different validation rules on the same field for different layouts.
  4. Validation rules are executed in the order in which they have been created.
  5. Validation rules cannot be supported for Lookup, Multi-select lookup, Multi-picklist, Formula, Auto-number, File Upload, Image Upload, and Multi-line field types.
  6. When you create a validation rule as well as Blueprint validation for the same field, and if the two conditions are different, Blueprint overrides the validation rule.
    That is, as long as the field is within a process, the Blueprint validation is applicable. When a record has exited a process, the validation rule is effective.
  7. Validation rules are supported in the following areas:
    1. Create (Web version)
    2. Quick create (Web version)
    3. Edit (Web version)
    4. Quick edit (Ajax - Web version)
    5. Copy customization
    6. Sandbox
  8. If records generated via webforms meet the validation rule criteria, they will be submitted for manual approval of records
  9. For existing rules, if you want to specify whether the alert be thrown when the condition is met or not met, you can simply edit the rule and choose  When criteria is not met or  When criteria is met  under  Execute Rule.

Example Scenarios

Following are a few more day-to-day example scenarios in which you can configure validation rules.

  1. If the  Phone Number  field does not contain 10 digits, throw an alert.
       

  2. If the  SSN  field does not contain 9 characters, throw an alert.

  3. Holiday Inc  needs to validate the age of their travellers in special cases. Anyone under 18 or over 35 cannot be enrolled in adventure trips. So here, the validation rule could say,  If Age is Not Between18 and 35 , throw an alert.

  4. Zylker Inc is a software company that offers in-person product training as a separate service. However, for a customer to request personal training, they should have purchased at least 10 user licenses of their software. Otherwise a training request cannot be accepted.
    So a validation rule could be created to address this situation. If  Training  is selected as  Required , but  Number of Users  is less than  10 , throw an alert - Sorry, we need a minimum of 10 users for training request to be accepted. This can be further drilled down, based on the product chosen.
    • If Product is A - 10 users
    • If Product is B - 20 users
    • If Product is C - 30 users and so on. 


  5. If Lead Source is  Chat , but the Skype field is {Empty}, throw an alert.
       

Delete a validation rule

When you delete a validation rule, the rule as well as the alert message associated with it will be deleted. When you attempt to delete a field associated with a validation rule, you will be prompted to first delete the rule, after which you are free to delete the field.

To delete a validation rule

  1. Go to  Setup  >  Customization  >  Modules and Fields .
  2. Select the module for which you want to delete the validation rules.
  3. In the [Module] page, click the  Validation Rules  tab.
  4. Point to the rule you wish to delete and click the  Trash  icon and confirm the action.

    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







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • FAQs: Validation Rules

                                                                                                    What is a validation rule in Zoho CRM and why do I need it? In this data-driven world, it is crucial to ensure the validity and accuracy of your data. Data can enter your CRM system through various channels, such as advertisements, web forms, ...
                                                                                                  • Creating Validation Rules Using Functions

                                                                                                    By using function you can create a validation rule where the value entered by the user needs to be verified outside the CRM database. You can even validate the fields like phone numbers, zip code and so on for a particular pattern by mentioning the ...
                                                                                                  • Points to note while updating a field used in a validation rule.

                                                                                                    Validation Rules are effective on creating a record manually. However, when fields used in a validation rule (whether primary or secondary) are updated through other ways such as workflow update, and APIs, the field update takes precendence over the ...
                                                                                                  • Zia Vision — Intelligent Image Validation

                                                                                                    You can use Zia Vision to automatically validate the images that are added to your CRM's records. Using this feature, you can ensure that these images are accurate, consistent, and of the requisite quality. This has multiple benefits, ranging from ...
                                                                                                  • Configuring Workflow Rules

                                                                                                    Workflow Rules in Zoho CRM, are a set of actions (email notifications, tasks and field updates) that are executed when certain specified conditions are met. These rules automate the process of sending email notifications, assigning tasks and updating ...
                                                                                                    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