> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-items/setup-items-multiple-pack-sizes/set-form-level-validations-in-setup-items.md).

# Set Form Level Validations in Setup Items

YouTube: [How to Assign Form Level Validations in Setup Items to Users in Logic ERP Software?](https://www.youtube.com/watch?v=mBts9xlzcT0\&t=245s)

In this tutorial, we'll explore how to use expression validation item configuration-wise in Logic ERP. This feature helps maintain data accuracy by applying custom validation rules during item creation.

***

### Steps to Apply Expression Validation in Logic ERP

* Navigate to **Setup Items** and then click on **Setup Items Multiple Pack Sizes**.
* By default, groups are marked as **Not Required**, allowing item creation without entering group details.
* To apply validation, mark the **Gender Group** as **Required**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FluNRAfv7zNkD4LnVryUc%2FRequired.png?alt=media&amp;token=89a401f6-5d8e-4091-b3f6-fb78d66ab249" alt=""><figcaption><p>The image shown above shows that the Gender group has been marked as required by right clicking on  it.</p></figcaption></figure>

* Add an **Expression** in MRP ensuring it is greater than the sale rate.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fw3XrZBbfI2IZR4bnPu2W%2FExpression.png?alt=media&amp;token=8ec7a076-8f04-4b94-95f2-6f461d5c515f" alt=""><figcaption><p>The image illustrates how expression is defined.</p></figcaption></figure>

* As soon as you apply an expression in MRP, it will be displayed in red color.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FCe5OV4E9XSAbRUcRkvo3%2FMRP%20Expression.png?alt=media&amp;token=bbf1f684-6dc0-489d-a408-caf37ba57c94" alt=""><figcaption><p>The above shown image shows that MRP field is marked in RED color stating that the expression has been applied</p></figcaption></figure>

### **Testing Validation Rules**

* Start creating an item.
* Skip the **Category Group** to test validation.
* The system will prompt an error message: *"Group 1 cannot be blank"*.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F6yH42k1so8NCg5wgThoB%2FPrompt%20for%20Group%20Selection.png?alt=media&amp;token=38c5b891-f19a-4316-80d7-48099fc3aa38" alt=""><figcaption><p>The image shown above displays the error message shown due to the validation applied on the group when left blank.</p></figcaption></figure>

* Enter a valid category and proceed.
* Set **MRP less than Sale Rate** to check expression validation.
* The system will display: *"MRP must be greater than the sale rate"*.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FlldCyOWYxVIzuxiu4hbK%2FPrompt%20for%20MRP.png?alt=media&amp;token=daba3e1e-00c5-44f8-b01e-de9d591cea79" alt=""><figcaption></figcaption></figure>

* Enter a correct MRP and successfully save the item.

### **Creation of Item Setup Configuration**

* Navigate to the Setup and expand Setup Items.
* Locate the option "**Setup Configurations for Item Setup**".
* Enter a configuration name and save the data.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FzGR24kqN0hAXlA3JqUFy%2FScreenshot%202025-03-06%20174801.png?alt=media&amp;token=dd37fe40-e782-4b66-9697-f208030c5595" alt=""><figcaption></figcaption></figure>

* Now, click on "Set Configuration" to create a separate configuration for individual users.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F2P78CGceXVAsD8FRdAuF%2FScreenshot%202025-03-06%20174957.png?alt=media&amp;token=7ab5c56f-250f-4510-bdfe-4f8329d1310a" alt=""><figcaption></figcaption></figure>

### **Assigning User Access Rights**

* Navigate to **User Access Rights**.
* Select the user and assign "Setup Item Configuration".
* Assign configurations:
  * **Aakash** → Finished Item Configuration
  * **Rahul** → Raw Item Configuration

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fmb4dwwYMqkbVPZA8QWQN%2Fuaser.png?alt=media&amp;token=e4d4f55d-04ff-40f5-bd5b-7629c3e923d7" alt=""><figcaption></figcaption></figure>

### **Supervisor Role: Setting Validation Rules**

* Log in as **Supervisor**.
* Navigate to **Setup Items Multiple Pack Sizes**.
* Set validation rules:
  * **Raw Item Configuration** → Mark **Category** as mandatory, enforce **MRP > Sale Rate**.
  * **Finished Item Configuration** → Mark **Fabric** as mandatory.

### **Testing User-Specific Validations**

* Log in as **Amit** (Finished Item Configuration user) and check the fabric field validation.
* Log in as **Rahul** (Raw Item Configuration user) and check category and MRP validation.

**Conclusion**

Expression validation in Logic ERP ensures data consistency, accuracy, and compliance across inventory management. Supervisors can define and enforce validation rules, minimizing errors and improving efficiency.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-items/setup-items-multiple-pack-sizes/set-form-level-validations-in-setup-items.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
