Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Model Validation


You use Model Validation to check UML models against known UML rules (which you identify in configuring validation) as well as any constraints defined within the model, using the Object Constraint Language (OCL). You can run Model Validation against a single UML element, a diagram or an entire package.

Access:    Project | Model Validation | Validate Selected (Ctrl + Alt + V)




See also


Validating a UML:

  • Element validates the element and its children, features (attributes and operations) and relationships (connectors)
  • Diagram validates the diagram itself (for correctness) as well as any elements and connectors within the diagram
  • Package validates the package and all sub-packages, elements, connectors and diagrams within it


Example - Model Violation

The following UML diagram contains several basic violations:


If you run Model Validation on this diagram, Enterprise Architect displays the following violations in the Output window:

  • It contains a UML ExpansionRegion (ExpansionRegion1) that is missing its child input ExpansionNode
  • It contains an invalid self-generalization on Class2 (UML elements cannot be self-generalized)
  • It contains an OCL violation for the anonymous Association (between Class2 and Object1)
  • It contains a UML ExceptionHandler (ExceptionHandler1) that is missing its child input ObjectNode


How To:

To use Model Validation, follow the steps below:



See Also


Select the package, diagram or element either from the Project Browser or within an open diagram



Select the Validate Selected menu option

Enterprise Architect performs the validation, and displays the results in the Output window (if the Output window does not automatically display, select the View | System Output menu option)

While performing the validation, Enterprise Architect also displays a progress window containing the Cancel Validation button, which enables you to cancel the validation process at any time

Alternatively, select the Project | Model Validation | Cancel Validation menu option

Output Window


  • If you double-click on an error in the Output window, you select the diagram element that the error message refers to

Learn More: