Skip to main content
All CollectionsAdvanced Form for AirtableValidation & Security
How to allow the field to submit only if certain conditions are met?
How to allow the field to submit only if certain conditions are met?

I want the field to submit only if meeting certain criteria. (e.g. barcode value should always be 9 digits)

Updated over a week ago

To enforce a valid format, go to Field Validation in the field settings. This allows you to define rules to ensure the input is validated before submission. For example:

  • You can set a minimum or maximum character length.

  • You can specify a pattern using regular expressions (regex).

This way, the field will only accept values that meet your defined conditions. It is also possible to make a field valid depending on the value of another field.

Supported Field Types for Validation

Field validation rules depend on the type of field you’re using.

Note: The supported field types are: Single-line text field, Long text field, Formula field, Date field, User field, Single-select field, Multi-select field, Checkbox field, Linked-record field, Lookup field, Phone field, Email field, URL field, Number field, Currency field, Percent field, Rating field, Duration field, Rollup field, Barcode field, Attachment field, Auto-number field.

Here are some examples of supported types and conditions:

Text Fields:

  • Supported for regex (e.g., “^[0-9]{9}$” to enforce exactly 9 digits).

  • Conditions like “contains”, “does not contain”, "is" or "is not empty", among others.

Formula Fields:

  • The available options will depend on the type of result (e.g., if the result is a number, you'll be able to use comparison operators.)

Number Fields:

  • Comparison operators like “greater than”, “less than”, "equals to" or "not equals to", among others.

Single/Multi Select Fields:

  • Supported for regex

  • Membership operators (e.g., is any of, is none of, has all of, has any of, has none of, is exactly, etc.)

Date Fields:

  • Validation for ranges (e.g., only allow dates in the future).

Checkbox Fields:

  • Validate if the checkbox is checked or unchecked.

Linked Record Fields:

  • Validation with string operators (e.g., contain, does not contain, is empty, is not empty)

Lookup Fields:

  • Validation with string operators (e.g., contain, does not contain, is empty, is not empty)

Attachment Fields:

  • Validations such as filename contains, is empty, is not empty.

Did this answer your question?