Validating OCL constraints in UML models
About this task
The syntax and the expression of a constraint are validated if the constraint has the «metaConstraint» stereotype applied to it or if it is defined in a profile. Only the syntax of a constraint is validated if it does not have the «metaConstraint» stereotype applied to it and it is not defined in a profile.
To validate an OCL constraint, in the Project Explorer view, right-click a constraint; then click Validate.