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).
Regular Expressions are extremely powerful tools for validation! You can learn more here.
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.
Percent Fields:
Validations such as is empty, is not empty.