You are here: System Setup > Attributes > Validation Rules

Validation Rules

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 here.

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.

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

Integer

Allows only positive numbers.

Valid values: 5, 26, and 199.

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.:

  • Red
  • Green
  • Blue

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.

Valid values:

Converter 20 bit, Cable 2.2 mm

Regular Expression

Allows for the applying of regular expressions as a validation base type.

[a-z]{3} ([0-9]{3})

Text

All characters (numeric and alpha) are valid.

 

URL

Allows applying a URL.

 

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.

2017, Stibo Systems