An attribute check script belongs to an attribute and checks if a value is valid, before assigning that value to the attribute.
![]() | 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. |
Table 7.9. Attribute check script selector
| Production | Syntax | Links |
|---|---|---|
attribute_check_script_selector | attribute_id "." "check" | the section called “Attribute check script” |
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).
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.