> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-forms/13.latest/editor/creating-a-form/form-advanced.md).

# Form Advanced Options

In this article, you will find information about accessing the Forms Advanced Options and the features available to customize your Form.

To access the Form Advanced Options:

1. Navigate to the **Forms** section.
2. Open a Form you wish to customize.
3. Click **Advanced** in the top-right corner of the screen.

{% hint style="info" %}
The advanced options for forms are only available when [configured to display](/umbraco-forms/13.latest/developer/configuration.md#enableadvancedvalidationrules).
{% endhint %}

## Validation Rules

When creating forms you can add validation to individual fields, making them mandatory or applying a regular expression pattern. You can provide validation rules for the entire form via the advanced options. This allows you to validate expressions based on multiple fields. For example, "these two email fields should be the same", or "this date should be after this other one".

![Validation rules](/files/anbt0tlJJpUjSNM2ASUg)

To add new rules, you need to provide the rule definition, an error message and select a field to which the message will be associated. Once created you can click to edit or delete them from the list.

Crafting the rule definition itself requires use of [JSON logic](https://jsonlogic.com/) along with placeholders for the field or fields that are being validated.

### Examples

One example use case would be ensuring that two fields match each other, perhaps when asking for a user's email address. Given two fields on the form, one with the alias of `email` and the other `compareEmail`, the rule would be:

```json
{
  "==": [
    "{email}",
    "{compareEmail}"
  ]
}
```

A slightly more complex example could be with two dates, where, if provided, you want to ensure the second date is later than the first. So given fields with aliases of `startDate` and `endDate` a rule would look like this:

```json
{
  "or": [
    {
      "==": [
        "{startDate}",
        ""
      ]
    },
    {
      "==": [
        "{endDate}",
        ""
      ]
    },
    {
      ">": [
        "{endDate}",
        "{startDate}"
      ]
    }
  ]
}
```

Rules can be nested too. In this final illustrative example, we have two fields. One with the alias `choose` is a drop-down list with two values: `A` and `B`. The second field with alias `test` we want to be completed only if the user selects `B`. So we create a rule that is valid only if A is selected OR B is selected AND `test` is completed.

```json
{
  "or": [
    {
      "==": [
        "{choose}",
        "A"
      ]
    },
    {
      "and": [
        {
          "==": [
            "{choose}",
            "B"
          ]
        },
        {
          "!=": [
            "{test}",
            ""
          ]
        }
      ]
    }
  ]
}
```

Overall, you can create rules of varying complexity, using comparisons between fields and static values.

When the form is rendered, these validation rules will be applied on both the client and server-side. In this way, you can ensure the submission is only accepted if it meets the requirements.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/umbraco-forms/13.latest/editor/creating-a-form/form-advanced.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
