Validation rules are set in System Setup: Attribute Groups and List of Values.
A validation rule defines the allowed content of a specific Attribute or List of Values.
A validation rule can include the following rule options:
|
Validation Rule |
Description |
|---|---|
|
Validation Base Type |
The basic data type, such as text, integer, number, date or List of Values (LOV). More details in the table below. |
|
List of Values |
If Validation Base Type is “LOV”, a reference to the actual LOV is made. |
|
Multi Valued |
Multiple attribute values on a single attribute are allowed / not allowed. |
|
Mask |
An input mask defines the pattern of characters allowed when entering a value. |
|
Min Value |
E.g.: “5”: means that the minimum numeric value is 5. |
|
Max Value |
E.g.: “7”: means that the maximum numeric value is 7. Using these Min / Max examples, 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. E.g.: 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 |
If Validation base type is 'ISODate' or 'ISODATE and Time', setting this field to 'Yes' make it so that only the desired Mask and way of entering a date is accepted. E.g.: For an ISODate, the only way to enter in a valid and accepted date would be in the following format with dashes between numbers: YYYY-MM-DD. This is set after the attribute is created on the Attribute tab under the Description flipper. Without Strict Validation, the stored values are not guaranteed to be searchable. |
Note: The validation rule options will change according to the selected Validation Base Type.
In the editors the validation base types are indicated by icons as shown below.
|
Validation Base Type |
Icons |
Description |
Example |
|---|---|---|---|
|
Condition |
|
Allows applying conditions. |
[AttributeID] = [Value1];[Value2] |
|
Date |
|
Allows a date to be entered according to a defined input mask, indicating the valid pattern of the value. |
The mask is: DD-MON-YYYY. A valid date is e.g.: 15-JAN-2008 |
|
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 defined input mask, indicating the valid pattern of the value. |
The mask is: YYYY-MM-DD A valid date is e.g.: 2008-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. |
The mask is: YYYY-MM-DD HH24:MI:SS A valid date is e.g.: 2008-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 System Setup / Super User Guide documentation 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. |
Note: Units can be applied to Attributes of all validation base types except: Text, Date, Isodatetime, and LOV.
In the Editors, icons are used to indicate the validation rule together with the optionality and the link status for the Attribute. An Attribute with the validation base type number is used as an example below:
|
Icons used for single valued attributes |
Description |
|---|---|
|
|
A single valued integer can be entered. |
|
|
A value is inherited from a higher level node. The inherited value can be overwritten. |
|
|
Attribute is set as mandatory. An integer must be entered. |
|
|
Attribute is set as mandatory. A value is inherited from a higher level in tree. The inherited integer can be overwritten. |
|
Icons used for multi valued attributes |
Description |
|---|---|
|
|
Multiple values can be entered. |
|
|
Values are inherited from a higher level node. The inherited values can be overwritten, and new values can be added. |
|
|
Attribute is set as mandatory. Integer(s) must be entered. |
|
|
Values are inherited from a higher level in tree. The inherited values can be overwritten, and new values can be added. Attribute is set as mandatory. |
2018, Stibo Systems