Validation Rules

Additional standards that are applied during model checks

Built-in rules

When Model Expert validates a diagram or package, it applies a set of built-in validation rules.

These are a set of built in rules, covering element and relationship types and stereotypes which are allowed /not allowed or are mandatory, incorrect multiplicity and direction for connectors, attributes and tagged values that have or have not been populated, classifiers and messages. Each rule has a severity associated with it, so, for example, using the wrong element type is more serious than a missing Tagged Value. When models or diagrams are checked and these rules are run, violations are shown on diagrams with color coding, depending on the severity that has been set.

You can update these rules to suit your modelling standards and save them in your Reference Models. Updates can include:

  • change the severity of each type of error: some values are provided by default
  • (set the severity to zero and the rule will not be applied when the Reference Model is used for validation)
  • change the ‘Rule Text’ to have an alternative explanation of the rule, or translate into your national language

Scripted rules

Model Expert provides lots of validation rules, but it can’t implement every kind of rule you might ever need. So you can create your own scripts which can run for either all meta-model types (not recommended), all instances of a specific element type, or instances of a specific meta-model type and stereotype. You can also create scripts to validate diagrams.

The types of rules you might add could check, for example:

  • for specific values in a variable,
  • whether users have obeyed a naming standard,
  • whether some kinds of connector exist.
  • any combination of the above.
  • how many elements in a diagram
  • whether the notes for a diagram are suitable

To add scripting rules to Model Expert, you will need knowledge of the EA Scripting languages, as well as some knowledge of the EA programming model.

More features like this

Did you know, we also offer Sparx EA training and consultancy?

We offer a variety of mentoring and consultancy options, as well as structured training and workshops, to support you with the skills you need to use Sparx EA efficiently in your business. Our goal is to bring clarity to your modelling, share solutions and equip you with insights, so that you can use the software more effectively. We already work with clients, both small and large and across many different industries, including the likes of Vodafone and KPMG.

Learn More

Compare licence prices

Choose the licence that’s right for you and your team


Download Model Expert

Take a free, no obligation, 30-day trial of Model Expert.  Model Expert is part of eaTeamWorks, so you can also trial eaDocX, Revision Manager, eaSheets and PortfolioManager. Plus free for life features. Discover for yourself why it’s the world’s best-selling Enterprise Architect extension.