Validation messages
Validation messages
- Subject: Validation messages
- From: "Clark, Igor" <email@hidden>
- Date: Thu, 8 Jul 2004 11:57:57 +0100
Hi folks
I posted a question about this a while ago but I can't find it by searching
on the omni list or on WODev, and I remember it being slightly inconclusive
anyway. Hopefully someone will be able to help out!
I have a simple validation mechanism in place for form components using
validationFailedWithKey and a validation dictionary as suggested in Malcolm
Crawford's Stepwise article. I'm into IS testing now and most of the 'bugs'
coming back are complaints that the error messages are too unfriendly or
meaningless to users: for example, "Removal of 'Role' object denied: in its
'users' relationship, there are related objects", "The roleName property of
Role is not allowed to be null", or "The roleName property of Role exceeds
maximum length of 50 characters". (I know, that last one in particular is
pretty clear to me too, but we have a ... rigorous testing regime here.)
I've tried implementing the (e.g.) validateRoleName methods on the relevant
objects to return a more user-friendly message, however, as it says in the
article:
"For Enterprise Objects, these methods are called after any constraints in
the EOModel have been checked."
so of course the methods are never called in the cases where they need to
be, for example when the proposed roleName is null or exceeds 50 characters.
So how can I intervene here? I can only think of Heath Robinson suggestions
at the moment like removing the model validation constraints and
implementing all the validateXXX methods instead (asking for trouble, I
feel), having a lookup table of unfriendly to friendly message version, or
even crazier, binding all the form fields to component variables so that the
form validation isn't done and leaving the EOValidation to do its thing. All
of which fleeting ideas seem daft.
Any ideas?
Thanks a lot.
Igor
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.