Book a Demo

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

Prev Next

Model Validation

Model validation banner

You use Model Validation to check UML models against known UML rules (which you identify when 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.

You can add to the system-provided validation rules by using an Add-In or an MDG Technology (such as BPMN) that contains its own rules.



Design > Package > Edit > Validation > Validate Current Package

Validation Concepts



See also

Validating Objects

Validating a UML:

  • Element validates the element and its children, its features (attributes and operations) and its 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

This UML diagram contains several basic violations of the UML rules:

An example UML diagram for demonstrating model validation functionality in Sparx Systems Enterprise Architect.

If you run Model Validation on this diagram, these violations are identified in the System Output window:

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

Learn more