# Valid Values

The Valid Values feature in Decision Tables plays a crucial role in maintaining the integrity and accuracy of your data. By restricting cell entries to a predefined set of valid options, you can prevent errors and ensure consistency across your decision-making processes.

Valid values can be defined in three ways:

1. **Value** - A predefined list of allowed values in specific column.
2. **Regex** - Pattern-based validation using regular expressions.
3. **Lookup Table Reference** - Values from another Lookup Table.

This functionality enhances the reliability of your tables, streamlines data entry, and establishes clear guidelines for data input, fostering a more dynamic and responsive decision-making environment.

## How to Apply Valid Values

1. Click the **arrow icon** in the header of the column.
2. Select **Valid Values**.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2Fo6jznw8L1OXh1eoGWofq%2FScreenshot%202026-02-11%20at%2015.17.46.png?alt=media&#x26;token=f7eea311-f11e-44d3-a795-d0fe76d997ff" alt="" width="555"><figcaption></figcaption></figure>

3. A modal will open with three validation type tabs: **Value**, **Regex**, and **Lookup Table Reference**.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FzKfHvne3h8cgYXUbvcvJ%2FScreenshot%202026-02-12%20at%2013.29.05.png?alt=media&#x26;token=91c303ce-70c5-4182-86dc-bdd8b9379742" alt="" width="563"><figcaption></figcaption></figure>

4. Choose your validation type and configure it (see sections below).
5. Click **Save values** to apply.

{% hint style="warning" %}
Valid Values **apply to simple cells only**.

Valid values **do NOT apply** when a cell is set to **function mode**.

Valid values **cannot be set** for **calculated columns** (calc columns are always in function mode).
{% endhint %}

### **Validation Type 1: Value (Predefined List)**

Define a specific list of allowed values for the column.

**How to set up:**

1. Open the Valid Values modal.
2. Select the **Value** tab.
3. Type valid value and **press Enter to confirm**.
4. Repeat for all allowed values.
5. Click **Save values**.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FboqxlZpccREgBK7BsgKx%2FScreenshot%202026-02-12%20at%2013.29.45.png?alt=media&#x26;token=dca7be57-7e1b-4af6-8397-75d75b80b78e" alt="" width="563"><figcaption></figcaption></figure>

Once valid values are applied, every cell (except for functions) in the column is checked against the predefined list. If a cell contains an invalid value, it will be flagged.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FmLzoEZpiJOalZQnD3mMW%2FScreenshot%202026-02-11%20at%2015.32.56.png?alt=media&#x26;token=5d089415-2b5b-49b4-8703-f20285b201a8" alt="" width="554"><figcaption></figcaption></figure>

Additionally, when valid values are set, you cannot directly type into the cells in that column. Instead, a dropdown with the list of valid values will appear when you click on a cell, allowing you to select the appropriate value.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FJyb22XsEaB9CoV02Ubzb%2FScreenshot%202026-02-12%20at%208.49.45.png?alt=media&#x26;token=5b36cfa6-350e-4978-a77a-9c5926672b3f" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
You can use not just simple values, but also variables, dates, or even full expressions as valid values. Spaces and operators are also allowed within a valid value.
{% endhint %}

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FC9HSR7OdL2ErV6FF3JNR%2FScreenshot%202026-02-12%20at%2013.30.30.png?alt=media&#x26;token=b1439c90-e6b7-4f91-bc3a-add5344a3738" alt="" width="563"><figcaption></figcaption></figure>

### **Validation Type 2: Regex (Pattern Matching)**

Use regular expressions to validate cell values against a pattern.

**How to set up:**

1. Open the Valid Values modal.
2. Select the **Regex** tab.
3. Enter your regular expression in the **Expression** field. Examples:
   1. Email validation `^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$`
   2. Phone (US) `^\d{3}-\d{3}-\d{4}$`
   3. Postal Code `^\d{5}(-\d{4})?$`
   4. Alphanumeric `^[A-Za-z0-9]+$`
4. Test your regex:

* Enter a test string in the **Test String** field.
* Click **Test Regex** to verify if the pattern matches.

5. Click **Save values**.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2F4Dh1C6S1ni34tBTWoImk%2FScreenshot%202026-02-12%20at%208.33.37.png?alt=media&#x26;token=4c87342c-f9c5-4163-be46-d4e782ed4b78" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FwOAA4yZeGl1RDUcEghbZ%2FScreenshot%202026-02-12%20at%208.35.16.png?alt=media&#x26;token=fa7b3a93-5363-46ce-9bab-db64e816bff8" alt="" width="563"><figcaption></figcaption></figure>

For more information about regular expressions and pattern syntax, see:

* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions)
* [Regex101](https://regex101.com/)

### **Validation Type 3: Lookup Table Reference**

Validate values against data from a Lookup Table in your space.

**For detailed information** about Lookup Table References and how they work, see [Lookup Table Reference](https://docs.decisionrules.io/doc/rules/lookup-table/using-lookup-tables-in-rules)
