A validation rule defines the allowed content of a specific attribute or list of values and can include the following rule options.
Validation rules are set for attributes in System Setup under the Description and Attribute Validation flippers. For lists of values, validation rules are set in System Setup under the Description and List of Values Validation flippers.
|
Validation Rule |
Description |
|---|---|
|
Validation Base Type |
The basic data type, such as text, integer, number, date or List of Values (LOV). Note: Validation rule options change according to the selected Validation Base Type. For more information, see the Validation Base Type table below. |
|
List of Values |
If Validation Base Type is “LOV”, a reference to the actual LOV is made. For more information, see the List of Value (LOVs) topic here. |
|
Multi Valued |
For attributes only, multiple values on a single attribute are allowed / not allowed.For more information, see the Single and Multi-valued Attributes topic here. |
|
Allow Users to Add Values |
For LOVs only, values can be added by users outside of System Setup.
|
|
Mask |
An input mask defines the pattern of characters allowed when entering a value. |
|
Minimum Value |
E.g.; “5” means that the minimum numeric value is 5. |
|
Maximum Value |
E.g.; ““7” means that the maximum numeric value is 7. Used with the Minimum example above, the value must be between 5 and 7. |
|
Maximum Length |
Only for textual data. E.g., “20”: means that a maximum of 20 characters is allowed. Note: The maximum length is validated including use of tags and inline reference tags. For example, if you style a text bold, then the characters in the style tags <bold> and </bold> are also counted toward the maximum length. |
|
Strict Validation |
For 'ISO Date' or 'ISO Date and Time' attributes only, the Strict Validation setting is located on the Attribute tab under the Description flipper. Setting this field to Yes ensures that only the industry standard formats of 'ISO Date' and 'ISO Date and Time' are accepted: YYYY-MM-DD for 'ISO Date' and YYYY-MM-DD HH:MM:SS for 'ISO Date and Time.' If Strict Validation is set to No, then the system will accept dates and times in non-standard ISO formats. This was only implemented for backwards compatibility in older STEP systems and is not recommended for systems using STEP 6.0 and later. For these non-standard formats, searching is problematic and not consistent. Therefore, best practice is to always set Strict Validation to Yes. Note: In the workbench, if the user has a locale applied and the 'Localize dates' option (located on the User object in System Setup under System Settings > PIM GUI Localization) is set to 'Y,' then that user may also enter 'ISO Date' and 'ISO Date and Time' date values using the locale's format. Example: if an attribute has a validation of 'ISO Date' and the user's locale is set to 'English (United States) - en_US,' then a date may be entered either as '2025-06-13' or 'Jun 13, 2025', and an attribute with a validation of 'ISO Date and Time' may have an entry of '2025-03-27 18:30:30' or 'Mar 27, 2025 6:30:30 PM.' Both types of entry will be accepted in the workbench, and for either type of entry, the workbench display will show the value in the locale's format. But, the value stored in STEP will always be the ISO format. In addition, searching on dates using > or < or = will be consistent and accurate. |
In the object editors the validation base types are indicated by icons as shown below.
Note: Units can be applied to attributes of all validation base types except: Text, Date, 'ISO Date and Time', and LOV.
|
Validation Base Type |
Icon |
Description |
Example |
|---|---|---|---|
|
Condition |
|
Allows applying conditions. |
[AttributeID] = [Value1];[Value2] |
|
Date |
|
Allows a date to be entered according to a predefined input mask, indicating the valid pattern of the value. Since the mask is predefined, a Mask value is not entered within the Attribute Validation settings. Note: This validation type has been superseded by the two validations of 'ISO Date' and 'ISO Date and Time'. Best practice is to use one of these newer validations and to not use the 'Date' validation. If you do use this validation, you cannot apply a locale to the value on data exports, and, in many cases, searching for objects by date values will be inconsistent and inaccurate. |
The mask is: DD-MON-YYYY. A valid date is e.g., 15-JAN-2025 |
|
Embedded Number |
|
Allows a number to be entered in between a prefix and a suffix. It is allowed, that the number has a unit. It is not allowed, that prefix and suffix start with a number. |
The mask is: Prefix Number (Unit) Suffix. A valid embedded_number for a Receiver could be: Converter 20 bit Lambda |
|
Fraction |
|
Allows numbers including dash (-) and slash (/). |
Valid values: 1/2, 1-1/2 Invalid value: 1 1/2 |
|
GLN |
|
Validates the length and check digit of the thirteen digit GLN. |
1111111111116 |
|
GTIN |
|
Validates the lengths check digits for multiple GTIN types. For instance, if an attribute is valid for either an EAN-8 or an EAN-13, this attribute can be configured to validate against either of them. By default, the GTIN Validation Base Type will validate the GTIN-8, 12, 13 and 14 digit numbers. If the requirement is to validate only the GTIN-8 and 13 digit numbers and not the GTIN-12 and 14 digit numbers, an input mask will have to be set so that 12 and 14 digit number are not accepted. For more information please see the Input Masks section |
22222220 or 4444444444444 |
|
GTIN-8 |
|
Validates the length and check digit of the eight digit GTIN. |
22222220 |
|
GTIN-12 |
|
Validates the length and check digit of the twelve digit GTIN. |
333333333331 |
|
GTIN-13 |
|
Validates the length and check digit of the thirteen digit GTIN. |
4444444444444 |
|
GTIN-14 |
|
Validates the length and check digit of the fourteen digit GTIN. |
55555555555555 |
|
Integer |
|
Allows only whole numbers. |
Valid values: 5, 26, 199, and -23. Invalid values: .250, 67.34, and 50 1/2 |
|
ISO Date |
|
Allows a date to be entered according to a predefined input mask, indicating the valid pattern of the value. Since the mask is predefined, a Mask value is not entered within the Attribute Validation settings. Note: It is strongly recommended to set Strict Validation to Y on any attribute that is 'ISO Date' validated. For more information, see the explanation of 'Strict Setting' in the Validation Rules table above. For workbench users with an assigned locale and a setting of 'Y' for 'Localize dates,' values may be entered not only in the ISO format but also by the locale's format. Both types of entry will be accepted, and for either type of entry, the workbench display will show the value in the locale's format, but the value stored in STEP will always be the ISO format. |
The mask is: YYYY-MM-DD A valid date is e.g., 2025-01-15 |
|
ISO Date and Time |
|
Allows a date to be entered according to a defined input mask, indicating the valid pattern of the value. Note: It is strongly recommended to set Strict Validation to Y on any attribute that is 'ISO Date and Time' validated. For more information, see the explanation of 'Strict Setting' in the Validation Rules table above. |
The mask is: YYYY-MM-DD HH24:MI:SS A valid date is e.g., 2025-01-15 12:15:40 |
|
LOV |
|
LOV must be selected containing the valid values. |
An LOV (List Of Values) will contain the valid values of an attribute, e.g.,
|
|
Number |
|
Allows any numeric characters. |
Valid values: 78, 1, .34, and 384.5. Invalid values: Fractions such as 50 1/2 |
|
Number Range |
|
Allows a range of numbers, separated by a dash (-). First value must be less than or equal to second value. |
Valid values: 1.2-3.6, 100-100, 5-7 Invalid values: 7-5, 76 |
|
Numeric Text |
|
All characters (numeric and alpha) are valid. It is also possible to link a Unit. The numeric text validation base type should be used for numerical data that may at times have non-numerical values. See the cell to the right for examples. Web UI users and those using the setSimpleValue() method in the business rules API: If using units and a user types a value in the field that matches a unit, but the user omits typing an explicit unit, then the text in the field becomes the value and the unit becomes null. If the attribute has a default unit, that unit is appended even if it matches the value string. The only exception to this behavior is if the text ends with a digit followed by a matching unit, e.g., '5m.' Examples to explain the concept described above are shown below (with 'm' being a valid unit and 'cm' being the default unit):
|
Valid values:
|
|
Regular Expression |
|
Allows for the applying of regular expressions as a validation base type. For more information, see the Regular Expression topic in Resource Materials online help here. Regular expressions used as validation base type can be stored as a Validation Template, allowing you to create an expression once and then apply it to multiple attributes by selecting the template from the Validation Base Type dropdown. For more information, see the Validation Templates topic here under the System Settings section of Users and Groups documentation in this guide. |
[a-z]{3} ([0-9]{3}) |
|
Text |
|
All characters (numeric and alpha) are valid. |
|
|
URL |
|
Allows applying a URL. |
|
| Validation Templates |
|
The standard validations that are available when creating a new attribute (Text, Number, Integer, etc.) may be augmented by adding new validations based on Regular Expressions. For more information about creating Validation Templates, see the Validation Templates section of System Settings here. |
2018, Stibo Systems – Confidential