Re: [solved] Multiple validation errors. Why?
Re: [solved] Multiple validation errors. Why?
- Subject: Re: [solved] Multiple validation errors. Why?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 19 Mar 2010 10:40:08 -0700
On 2010 Mar 18, at 21:04, Lynn Barton wrote:
> That was just the help I needed. Console messages showed that I needed to explicitly set the value of one of the string attributes, which was defined with a minimum length of zero
After I had something like this happen a couple times, I decided to *never* set those minimum and maximum values, and always leave the 'Optional' boxes checked in a Core Data model. Inevitably, often just momentarily as things are being created or torn down, there will be an illegal value. If I need validation, I do it in my own code and take appropriate action. Most users don't react well to a boldfaced "Multiple validation errors occurred."
Also, Sean's code illustrates another reason to use your own error presentation -- Cocoa's sometimes loses helpful information. You may not want to display it all to the user, but you can at least log it. My alert has an 'Email Support' button which, when clicked, writes a nicely formatted -longDescription of the error to the body of an email message.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden