You can add validations to a field to ensure the validity of data being entered into the CMS and through the APIs.
Marking a field as required
Fields can be marked as required to make sure that CMS entries and API endpoints throw an error in case this field is missing.
- Select a field you want to mark as required.
- Go to the
VALIDATIONtab in the properties panel for the field.
- Toggle the required field input to on.
Changes are saved automatically but still need to be published to reflect in the APIs and the Content management system.
The validation builder allows users to build powerful and granular validation logic that needs to be applied to fields.
|Property||Validation will be applied on this field property.||
|Condition||The condition which will be applied on the property.||
|Value||The value against which the property will be compared.||
Depending on the input type different validation options are applicable. See Field Types for a list of the different validation operations.
Adding a validation
- To add a validation, click on
+ Add a validation
- Select what property you want to apply the validation on.
- Select the condition which will be applied on the property.
Greater Than (>)
- Enter the value against which the property will be compared.
Testing a validation
You can test a validation by entering an input into the test validation field next to the validation builder.
Editing a validation
You can edit the validation by clicking on the validation option that you want to edit and selecting the new value.
Changes save automatically, however they must be published before they are available in the CMS and the API
Deleting a validation
You can delete a validation by clicking on the delete icon next to a validation.