> ## Documentation Index
> Fetch the complete documentation index at: https://filla.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Required fields and validation

> Make fields required, add custom validation rules, and set friendly error messages.

## Making a field required

The **Required** toggle is always visible at the top of a field's settings panel — no need to expand any section. Toggle it on to prevent form submission unless that field has a value. Filla checks required fields before submission and shows an error on any field that's empty.

What "empty" means depends on the field type:

* Text fields: empty string or whitespace only
* Number fields: no value entered
* Select fields: no option selected
* File upload: no files uploaded
* Linked record: no records selected

## Custom validation rules

Beyond required, you can add **custom validation rules** to any field. Rules are built with the same filter builder used for conditional logic. They let you express constraints like:

* "This number must be greater than 0"
* "This text must contain the word 'http'"
* "This date must be in the future"

<Steps>
  <Step title="Open field settings">
    Click the field in the canvas to open its settings panel.
  </Step>

  <Step title="Expand the Validation section">
    Expand the **Validation** section in the settings panel.
  </Step>

  <Step title="Add a rule">
    Click the **Validation rules** trigger to open the filter builder dialog. Select an operator and enter a value. Add multiple conditions with AND/OR logic.
  </Step>

  <Step title="Set a custom error message">
    In the **Validation error message** field, enter the message shown when validation fails. If left blank, a generic error message is used.
  </Step>
</Steps>

## Validation settings

| Setting                      | Description                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Required**                 | Respondent must fill in this field before submitting. (Top-level toggle.)                                                |
| **Validation rules**         | Filter-based conditions the field's value must satisfy.                                                                  |
| **Validation error message** | The message shown when a custom rule fails. Use this to give clear, specific guidance.                                   |
| **Must be unique**           | Reject values that already exist in the same Airtable field. See [Reject duplicates](/docs/field-settings/reject-duplicates). |

## Reject duplicates

Enable **Must be unique** to prevent a value that already exists in the Airtable table from being submitted again. See [Reject duplicates](/docs/field-settings/reject-duplicates) for details.

## How validation order works

Filla runs validations in this order:

1. Required check (is the field empty?)
2. Min/max character length (text fields)
3. Domain restrictions (email fields)
4. Phone format (phone fields)
5. Date range (date/datetime fields)
6. Number range (number/currency/percent fields)
7. Max selections (multiple select fields)
8. Linked record count limits
9. Attachment limits
10. Custom validation rules

## Common questions

<AccordionGroup>
  <Accordion title="Can I make a field conditionally required?">
    Not with a direct toggle, but you can combine conditional visibility with required. If a field is only shown when certain conditions are met, and it's marked required, the required check only applies when the field is visible.
  </Accordion>

  <Accordion title="Can I write a validation rule that references another field?">
    Custom validation rules evaluate the field's own value against a static condition. They cannot directly compare one field to another. Use conditional visibility or a formula field in Airtable for cross-field dependencies.
  </Accordion>

  <Accordion title="Is validation enforced server-side?">
    Yes. Filla runs validation on the server when the form is submitted, not just in the browser. This means validation cannot be bypassed by disabling JavaScript.
  </Accordion>
</AccordionGroup>
