Core Data Validation Ignored?
Core Data Validation Ignored?
- Subject: Core Data Validation Ignored?
- From: Andrew Merenbach <email@hidden>
- Date: Tue, 19 Feb 2008 21:28:55 -0800
Hi, all,
I want to make my program display a validation error alert when a
string is less than one character long -- I basically want no nil
values. This is in a table view, I should also mention, that displays
records (entities, with corresponding subclasses of NSManagedObject),
that are maintained by an NSArrayController.
I have set the minimum length for this string attribute in my data
model file, but this seems to be ignored in the table view.
Additionally, if I select my entity in the data modeler and use the
New File... managed-object-class creation assistant, even if I check
"Generate validation methods" I get no validation methods -- at all --
in the created files, despite the requirement of length and whatnot.
Despite my searches through the documentation (and despite my possible
incorrectness in assuming that the validation-method generator will do
what I want), I have found no way to get the table view to validate
properly. Furthermore, making a -(BOOL)validateMyTitleAttribute:(id
*)ioValue error:(NSError **)outError in my NSManagedObject subclass
does absolutely nothing.
I've been bashing my head against this one for the past few days, and
a search of the archives leads me to think that maybe my project -- or
at least my data model -- is corrupt. The project is so complicated,
however, that I wanted to ask here before undertaking such a weighty
matter.
Many thanks!
Cheers,
Andrew
_______________________________________________
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