Book a Demo

Author Topic: How to model validation rules and messages?  (Read 2277 times)

Werner Schoenmaekers

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
How to model validation rules and messages?
« on: April 19, 2012, 02:25:52 am »
We have a classes "Car" and "Wheel", they are connected with an association.
"Car" has attribute "Fuel tank" of type integer.  It must be between 1 and 100 liters.

Questions:
- Where and how do model the "between 1 and 100" rule?
- Where do I model the message which must be shown to the user if he enters f.e. 200.

The goal is to generate a document where we have:

Class: Car
Association Wheel
Attribute: Fuel tank
    Constraint: between 1 and 100
    User message: "Please enter a value between 1 and 100".

How this is shown in the document is less important ( how many columns etc... ), but these 3 specs must be shown under "Car".
« Last Edit: April 19, 2012, 02:29:02 am by wschoenm »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to model validation rules and messages?
« Reply #1 on: April 19, 2012, 08:57:00 am »
From the description you've given (and assuming you're not otherwise using Attribute Constraints) I would put it on the Attribute Constraints using the Description as the User message.