Validations
Validations allow you to enforce cell values of a column to meet specified conditions before the data is submitted. Any validations that fail for a cell will be shown to the user on the Review screen of the import where they’ll be able to edit the cell values.
Validations are defined as an array on a template column:
The type of validation (see all options).
If the validation accepts additional options they can be configured here. The schema of options
is dependent on the
specific validation. For example, the regex
validation expects this as a string which is the pattern to match.
The message to display to the user as a tooltip in the cell on the Review screen if the validation fails. If not provided, a default message will be generated depending on the validation.
Validate Options
Validations can either be allowed for all data types (universal) or only compatible with specific data types.
Universal
The cell must contain a non-blank value. Blank is defined as either being empty or containing all unicode
whitespace characters (' ', '\n', '\t', '\v', '\f', '\r', U+0085 (NEL), U+00A0 (NBSP)
).
String
The cell must equal one of the values in the provided list. Comparisons are case-insensitive but the cell values will be formatted in the case of the list value.
The cell must be a valid email address.
The cell must be a valid phone number.
The length of the cell must be within the provided min and/or max options.
Only one min or max option is required:
The cell must match the regex pattern provided.
Number
The value of the cell must be greater than or equal to the min and less than or equal to the max.
Only one min or max option is required: