In another post Erik noticed a “validate()” method in an OPT model class.
The idea is to generate validation rules for OPT elements. There are 3 levels:
- Using generated constraints to validate that the OPT fields are in accordance with the constraints. Each OPT model class will implement a validate() method to validate its data. It will also call a validate() method of its ancestor (in case of RM classes - see #3 below):
-
Using the “rules” section in the OPT. The rules are in a computable form. They operate on an entire OPT.
-
Using the “invariants” for the RM classes. These invariants are not yet in a computable form.
@thomas.beale Could the “invariants” use the same EL as the “rules” section in the OPT?