• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data Validation Ignored?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Core Data Validation Ignored?
      • From: Quincey Morris <email@hidden>
    • Re: Core Data Validation Ignored?
      • From: Andrew Merenbach <email@hidden>
  • Prev by Date: NSPopUpButton menu list not showing all the menu items
  • Next by Date: Re: makeFirstResponder returns NO
  • Previous by thread: Re: NSPopUpButton menu list not showing all the menu items
  • Next by thread: Re: Core Data Validation Ignored?
  • Index(es):
    • Date
    • Thread