Rule & Warning types

Summary

Generic rules

  • SDM doesn’t execute the rules or warnings if the field is empty, except if the requirement level of the field is required or the field has a rule with the type: required, required with, required without, or required on
  • Rules are only applied at the normalization step
  • If you have multiple rules or warnings on a field, they are combined with an “AND” operator. So it’s a combination of all rules and all warnings, in other words, all rules and all warnings must be valid.
 

All Types

Type Description Example Is executed even if the product field value is empty Notes
required Makes sure that a value is entered in the column, otherwise an error will be displayed. Column A must have a value. YES  
required with Ensures column A is required if certain other columns are completed. If Columns B and/or C have values, column A must be completed. YES Options: 
- columns 
- which: all or any
required without Ensures column A is required if certain other columns are empty. If Column B and/or C are empty, column A must be completed. YES Options: 
- columns 
- which
required on Ensures column A is required if another column has a specific value. Column A is required if Column B has a specific “value” (e.g., "Red"). YES Only valid on string 
Options: 
- column 
- pattern
regex Ensures the value in the column matches a regular expression pattern. Column A must match the regex pattern ^[a-zA-Z0-9]+$. Options: 
- pattern
is_true Ensures the column has a boolean value of true. Column A must be set to true.  
unique Ensures the value in the column is unique across all rows. Values in Column A must be unique.  
unique with Ensures the combination of values from multiple columns is unique across all rows. The combination of values in Columns A and B must be unique. Originally used for variation 
Option: 
- column
unique on Ensures the value is unique when a specific condition is met. Column A must be unique if Column B has a specific value (e.g., "Active"). Option: 
- columns
isin Ensures the value in the column is within a defined set of acceptable values. Column A must be one of ["Red", "Green", "Blue"]. Options:  
- values 
Mainly used to check that options in Select attributes are the right ones depending on conditions. Same for families. 
 
max_length Ensures the value in the column does not exceed a maximum number of characters. Column A must not exceed 255 characters. Options:  
- threshold 
- strict  
Warning: no check is make on type (string or number) Ex: can be used for EAN checks on 13 digits max 
 
max_value Ensures the value in the column does not exceed a maximum numerical value. Column A must be less than or equal to 100. Options:  
- threshold 
- strict
min_value Ensures the value in the column meets a minimum numerical value. Column A must be greater than or equal to 10. Options:  
- threshold 
- strict
superior to Ensures the value in column A is greater than the value in column B. Column A must be greater than Column B. Type number only 
Options:  
- column 
- strict
inferior to Ensures the value in column A is less than the value in column B. Column A must be less than Column B. Type number only 
Options:  
- column 
- strict
uneditable Ensures the column value is not editable after the initial entry. Column A becomes uneditable after it has been set.  
equal to Ensures the value in column A is equal to a specific value or matches the value in another column. Column A must equal Column B or have a specific value like "Completed". Option: 
- column

Images

  • Unique_with: an error is displayed for ligne 5, as a is not unique with B