Skip to main content

Cell Validation & Required Fields

AnyDB supports cell-level required settings and dynamic validation rules. This allows you to enforce data quality with context-aware checks and custom error messages.

Required Cells

You can mark any cell as Required, ensuring that users must fill it in before saving.

  • Required cells are marked with an asterisk (*).
  • If left empty, the user will be prompted to enter a value.

AnyDB Required Cell

Dynamic Required Rules

Required settings can also be conditional, meaning a cell is only required based on other data in the record.

For example:

You can set the Age field to be required only if the Subject column is set to Biology.

B2 == 'Biology' ? true : false

In this case the Age field will only be required if the Subject column is set to Biology. If Subject is anything else, Age is optional. This makes validation more flexible and reduces unnecessary input requirements.

To set a conditional required rule:

  1. Select the cell and open the Cell Details panel.

  2. In the Validation section, click on fx icon on the top right corner.

    AnyDB Conditional Required Cell

  3. Click on '+ Computed Property' and select 'Required' from the dropdown.

  4. Enter a formula that evaluates to true or false to determine if the cell is required.

    AnyDB Conditional Required Formula

Dynamic Error Messages

Along with required rules, you can define custom error messages that appear when validation fails.

For example, if a student tries to register for Biology but is under 20 years old:

AnyDB Custom Error Message for Required Cells

The system displays:

Need to be 20 to take biology

This gives users clear guidance on why their input was rejected and how to fix it.