November 2022

A company sometimes needs the content of a field to meet specific requirements. Thanks to Validations, Sales Layer allows you to establish certain rules so that each user knows how to insert data in one or more fields correctly, following the requirements assigned.

Validations work the same in all tables: products, variants, Custom Entity tables, categories... when you create a single attribute inside the platform when you perform a manual import, a linked source import, or through an import via API.

You can apply more than one validation rule per field, as long as the nature of the field allows it.

Here are some different types of Validations available at the moment:

1. Maximum number of characters in text field: it allows you to set a maximum number of characters for a text field (Name field included).

2. Required field: you can use this type of validation if you want a field to be mandatory in a form (valid in every field except Status and Tags) 

3. Range in numeric values: you can create this validation in a numeric field to define a range of accepted numeric values for the field. It applies to integers, decimals, and negatives.

To configure a validation in a form, go to Actions, click on Redesign form, and select the Modify option of the field where you want to apply it.​​​​

Choose the validations you need and as soon as you save it, you will see a green check if the field condition is met or a red icon if the field was filled erroneously.

By clicking on the error icon in each field, you can get more details of the error to be able to correct it.

1

Keep in mind, if you set a validation in a field, this must be filled with data or it will be recognized as an error if empty.

If you want to delete a validation rule, leave the field empty and click on modify. If the validation has to do with the range of numbers in the validation type, you'll need to set it at None.

Note: Validations affect the quality report of the item. If a field is empty or marks a validation error, it will be considered as not completed in the Quality Report section.

The functionality sets the rules for the correct content in a field, but it is important to know that it will never prevent the user from saving the form. 

You can import manually, use connectors or even export the content and use workflows in the usual way. If any imported value does not respect any existing validation, you will be able to see the error inside the form, in the platform. 

Warning: This feature is included in the Enterprise/Enterprise+ accounts by default. If you are interested in testing the feature, do not hesitate to contact your Partner or our support team via the usual ways.