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.
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:
-
Select the cell and open the Cell Details panel.
-
In the Validation section, click on fx icon on the top right corner.
-
Click on '+ Computed Property' and select 'Required' from the dropdown.
-
Enter a formula that evaluates to
true
orfalse
to determine if the cell is required.
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:
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.