Global validation rules check the result of an element set, while validation rules contained in predefined validation suites or active validation suites are dedicated to check a separate element. You can create global validation rules in the same way as other validation rules by defining an appropriate condition in the Specification property.

For example, the balanced budget validation rule (Constraint specification is shown in the following figure) is a global validation rule. It is created for the classifier of the ReseachProject Class. The balanced budget validation rule condition, defined by using OCL2.0 language in the Specification property, expresses that the sum of the expenses of all projects must be less than the sum of all Sponsor contributions. This validation rule is global because it includes all instances in the model, rather than only the particular instance of ResearchProject that violates the rule.

Sample model

An example of a global validation rule can be found in the model validation sample model > Classifiers Validation Rules Class diagram. To open this sample do one of the following:

  • Download model validation.mdzip.
  • Find in the modeling tool <modeling tool installation directory>\samples\product features\model validation.mdzip.


The specification of the global validation rule named balanced budget.


After the validation finishes, the global validation rule is marked as <model> in the Validation Results panel > Element column. This means that the entire model, not the separate element, violates the rule.


The representation of global validation rule in the Validation Results panel.