OK, this discussion has indeed been interesting so far. Let me throw out a couple more things:
1) A book I have (OK, it's Russ Miles and Kim Hamilton, Learning UML 2.0, O'Reilly, 2006) on p. 242 gives examples of applying a constraint at:
a) the attribute level ('baseCost >= 0.0')
b) the class level ('self.baseCost >= 0.0').
As I understand it, the meaning is the same (it certainly means the same thing to me but I'm not using the constraints to build code automatically) but the maintenance may be easier one way rather than another. EA has its own way of handling constraints with corresponding opportunities and challenges. I see that if I put a constraint in the dialog for an attribute this has the advantage that if I move the attribute to a new class, the constraint moves with it, and the disadvantage that I have to open the dialog for the attribute and click on the proper tab in order to see the constraint.
If, on the other hand, I add the constraint at the class level, I have the advantage that the constraint appears on the diagram--a major plus for a reviewer or someone coding to the design, but the disadvantage that if I move an attribute (say I am refactoring the design, which event was actually the trigger for the original thread topic) I have to copy the corresponding constraint manually from one class to another (which requires opening multiple class properties dialogs in succession to copy and paste each constraint one at a time).
2) On that note, I wonder if it might be advantageous to give constraints more visibility in EA. This might mean:
a) giving constraints visibility in the project view. This might be too big a change.
b) showing constraints in a window (either in a Constraints window or as a section in another window). EA already has a Notes window where we can easily view (and copy and paste) notes for a selected item (which can be an attribute or a class, among other things). EA does not (to my knowledge) support the same behavior for constraints (and the Properties window applies at the class level, not the attribute level). I think this would be quite nice functionality to have.