best practice(s) for validating properties
best practice(s) for validating properties
- Subject: best practice(s) for validating properties
- From: Tom Woteki <email@hidden>
- Date: Thu, 4 Sep 2003 14:45:04 -0400
Hi:
I'm looking for a better (see below) approach to validating properties
than the default provided by the EO framework. I've checked the
archives (and may have missed something) and read the treatments in the
various books on WO (old and newer) but haven't found what I'm looking
for. Perhaps someone here can point the way.
Specifically I'm interested in developing a better approach to handling
the model-based (e.g. nulls disallowed, string lengths) or
formatter-based validation exceptions that are trapped by the framework
before my EO's validateMyAttribute methods are called. By better I mean
an approach that is object oriented avoiding cascading if statements in
validationFailedWithException to detect specifically why validation
failed. I know that this method provides all the info I need to
pinpoint the exception but the code get pretty ugly pretty fast
(checking key paths, checking exception messages) and the default
exception messages are not particularly user friendly.
Can someone point the way?
Thanks very much,
Tom
_______________________________________________
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.