> **Source:** https://knowledge.leegality.com/document-execution/workflows/v4/setup-configuration/field-configuration > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Control Input Format A **validation** controls the **format** of what is entered into a field in a v4 workflow — using character limits and a **Regex** (regular expression) pattern. For example, you can enforce a PAN pattern on the Internal Reference Number so that only correctly formatted values are accepted. ## What you can set For each field, you can set a: - **Minimum character limit** - **Maximum character limit** - **Regex** — a pattern the entered value must match. ## Add a validation 1. Right-click any field to open the pop-up. 2. Go to the **Validations** tab. 3. Enter the **Minimum character limit**, **Maximum character limit**, and **Regex** as needed. 4. Click **Apply**. > **Info — Note** > > A validation applies to every field of that type across the workflow. For example, if you set a validation on the **Document Name** field, it applies to all Document Name fields in the workflow. **What's the difference between a validation and making a field Mandatory?** > **Mandatory** (a [Field Property](https://knowledge.leegality.com/document-execution/workflows/v4/setup-configuration/field-properties)) controls *whether* a field must be filled before proceeding. A **validation** controls the *format* of what is entered — and only runs if a value has been entered. For example, a **Minimum character limit** of more than 0 does **not** force the field to be filled; if the field is left blank, the validation is skipped and no error is raised. > > A field can use both: **Mandatory** so it can't be skipped, and a **validation** so the value, once entered, matches the required format. Don't use a minimum character limit as a substitute for Mandatory — it won't have the intended effect on empty fields.