Attribute check script

Usage

An attribute check script belongs to an attribute and checks if a value is valid, before assigning that value to the attribute.

[Note]Note
To check several, mutually dependant attributes, instead of the value of a single attribute, the attribute_check script should be used instead of the attribute check script. See the section called “attribute_check script” for checking several mutually dependant attributes.

Selector syntax

Table 7.9. Attribute check script selector

ProductionSyntaxLinks
attribute_check_script_selectorattribute_id "." "check"the section called “Attribute check script”

Input argument

This script has one input argument that holds the value to be checked. The id suffix and type of this input argument are the same as those of the attribute (e.g. if the attribute's id is a_level then the input argument's id is i_level).

Output argument

This script has one output argument whose id is o_error and whose type is ty_error_check_attribute. o_error is void if the attribute value is valid. Otherwise it returns an error describing the first check that failed.

Examples

See: the section called “Attribute property check

See also