## Zoho Inventory Documentation Index Access the complete documentation index at: https://www.zoho.com/in/inventory/llms.txt Use this file to discover all available documentation pages before proceeding. # Validation Rules Validation Rules can be used to set conditions to validate the data entered in a field before it is recorded. If any of the conditions are met, an alert message will be displayed and the user will not be able to proceed with the transaction until they provide an acceptable value.  **Note:** This feature is available only for [selective pricing plans](/inventory/pricing-comparison/) and is supported in Sales Orders, Purchase Orders, Invoices and Bills. **Scenario:** Peter runs a catering business where he takes orders from his clients and provides them services. During payment, he provides a small discount as a thank you. When Peter is unavailable, his team reaches out to the customers. Sometimes, his staff tends to give a higher discount that Peter might not really approve of. To prevent this, Peter sets up a validation rule not to create an invoice with more than 10% discount. * * * ### Create Validation Rule To create a validation rule for a field in Zoho Inventory: * Go to **Settings** in the top right corner. * Select the module for which you want to create the lock configuration under _Module Settings_.(for example, Invoices). * Go to the **Validation Rules** tab and click **\+ New Validation Rule**. ![New Validation Rule button](/inventory/help/images/settings/validation-rule-new-button.png) * Select a **field**. It can either be a custom field or any of the default fields in the module. * Specify the **criteria**. * Enter the **alert message** to be displayed when the rule is violated. * Click **Continue**. ![New Validation Rule](/inventory/help/images/settings/validation-rule-new.png) * If you want to add another rule for the same field click **\+ Add Another Validation** and repeat the steps mentioned above. ![Another Validation Rule](/inventory/help/images/settings/validation-rule-add-another.png) * Click **Save** at the top right corner. **Insight:** * The validation rules created in Zoho Inventory will apply to the other integrated Zoho apps as well.  * You can only create up to 10 validation rules for a module. * * * ### Multiple Criteria and Subrules When you create a validation rule for a field, it applies to all transactions created in the particular module. If you want it to be applied only on selected transactions, you can specify the criteria under which the rule must be executed, which you can do in two ways: * [Adding Multiple Criteria](/in/inventory/help/settings/validation-rules.html#multiple-criteria) * [Adding Subrules](/in/inventory/help/settings/validation-rules.html#subrules) #### Multiple Criteria **Scenario:** Peter had created a validation rule where the invoice discount cannot exceed 10%. However, he provides a discount only when the invoice total amounts to at least $30. So, he customizes the existing rule by adding a criteria with the transaction total to be >= $30. To add a criteria to a rule: 1. Go to **Settings** in the top right corner. 2. Select the module for which you want to create the lock configuration under _Module Settings_.(for example, Invoices). 3. Go to the **Validation Rules** tab. 4. Click the _pencil_ icon near the rule you want to edit. ![Edit Validation Rule](/inventory/help/images/settings/validation-rule-edit.png) 5. Click the option **Based on a specific criteria** in the following pop-up. 6. Set the criteria using the options provided. 7. Click **\+ Add Criteria** to add another criteria for the rule. 8. Click **Edit Pattern** to change the criteria pattern based on your preferences. 9. Click **Done** to save your changes to the rule. ![Edit Validation Rule 1](/inventory/help/images/settings/validation-rule-criteria-based.png) #### Subrules You can include additional rules called subrules to an existing condition.  **Scenario:** Peter had created a rule where the invoice discount cannot exceed 10%. Now, he would like to use the same rule (<= 10% discount) but add another condition to it where it is applicable only from July to November. So he creates a subrule with the transaction date to be >= July 1. This will prevent his staff from giving discounts on other months. Here’s how you can add a subrule: 1. Go to **Settings** in the top right corner. 2. Click **Sales Orders** or **Invoices** under Sales in _Module Settings_. 3. Click the **Validation Rules** tab. 4. Click on the field name for which want to add a subrule. 5. Go to an existing rule and make sure it is set based on a critera. If not, click the pencil icon to change it and save it. 6. Click **\+ Add Subrule**. ![Add Subrule](/inventory/help/images/settings/validation-rule-subrule.png) 7. Specify the conditions and enter the alert message to display. 8. Click **Done**. 9. Click **Save** at the top right corner to activate the subrule. * * * ### Other Actions You will be able to edit, delete or mark a validation rule as inactive. Here’s how: 1. Go to **Settings** in the top right corner. 2. Navigate to the module for which you’ve enabled validation rules under _Module Settings_ (for example, Invoices) 3. Hover over the validation rule to perform the following actions: * **Edit:** Change the message or the criteria of a validation rule. * **Mark as Inactive:** Disables the validation rule temporarily. You can enable it again by clicking Mark as Active. * **Delete:** Click the _Trash_ icon to discard the validation rule permanently. ![Status of the Validation Rule](/inventory/help/images/settings/validation-rule-status.png) * * *