Validator
The “validator” is a global variable, which is available in each TMS rule.
global Validator validator;
The validator object provides methods for
- Raising warn messages
- Raising error messages
Thereby the rules developer can provide:
- A message which might be shown to the user of the UI / REST service
- One or more attributes, which are the cause for this
In its newest version it also provides localized error messages.
validator.error("This test bench needs calibration!", $attr);
In the first rule the validator has been used to create an error message, handling a message and the cause of the error, the next calibration attribute. Both are used by the UI to give the user precise information about what has been validated. The error message will be appended at the top and the source of the error, the field is marked red.

Resulting error message due to calibration rule
warning
The declaration of the validator is mandatory in each rules snippet. Compilation will fail if is not declared!