Content Fields Validations
You can add validation rules to content fields. This means that end users filling in these fields must comply with these rules. If they do not, they cannot save the object they’re editing/creating. The most commonly used validation rule is ‘required’, where the field must have a value before being savd. You can add the following validation Rules:
The user is required to enter something in this field
Speaks for itself.
Required length of content (text fields)
The content length of the text field must be between, greater than or lower than set numeric value(s).
Match content with a pattern (text fields)
You can pass a regular expression. Useful when the content must follow a certain pattern: email, zipcode, only numbers, etc.
Allowed file types (media field)
The selected media file must be of one of the allowed file types:
Image
PDF
Audio
Code
Word Document (.doc, .docx)
Excel Spreadsheet
Powerpoint Presentation
Font file
Required file size (media field)
The selected media file must be between, greater than or lower than set value(s) in file size.
Required amount of selected options (checkbox choice field)
The user must check a number of checkboxes that is between, greater than or lower than set numeric value(s).
Required amount of referenced objects (references field, array fields)
The user must create a number of references that is between, greater than or lower than set numeric value(s).