Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8503943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:53:34+00:00 2026-06-11T01:53:34+00:00

I have an ArrayController bound to a master/detail UI which is working just great.

  • 0

I have an ArrayController bound to a master/detail UI which is working just great. I’m now trying to implement validation at the model level.

Apple docs indicate the follow should work to validate individual properties:

-(BOOL)validateName:(id *)ioValue error:(NSError * __autoreleasing *)outError

So if I have a model property of “ProjectName”, the following should automatically fire:

-(BOOL)validateProjectName:(id *)ioValue error:(NSError * __autoreleasing *)outError

But unfortunately, it just doesn’t happen 🙁

However, interestingly, if I use the “catch all” method as below, it DOES work:

-(BOOL)validateValue:(inout __autoreleasing id *)ioValue forKey:(NSString *)inKey error:(out NSError *__autoreleasing *)outError  {

Within the method I can code to determine which property is being validated of course, but I can’t figure out why it completely ignores the accessor method?

Can anyone shed any light on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:53:36+00:00Added an answer on June 11, 2026 at 1:53 am

    The validation method does not automatically fire – from your linked documentation:

    In general, key-value coding does not perform validation automatically—it is your application’s responsibility to invoke the validation methods.

    And also:

    You can call validation methods directly, or by invoking validateValue:forKey:error: and specifying the key. The default implementation of validateValue:forKey:error: searches the class of the receiver for a validation method whose name matches the pattern validate:error:. If such a method is found, it is invoked and the result is returned. If no such method is found, validateValue:forKey:error: returns YES, validating the value.

    Which explains your second situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSTableview which s bound to a NSArrayController. The Table/Arraycontroller contains Core
I have an NSTableView, the content of which is bound to an arrayController using
I have an array of NSMutableDictionary objects which are displayed in a master–detail interface
In my application I have an NSSearchField that is bound to an arraycontroller which
I have a texfield bound to an ArrayController. The controller key is selection because
I have an array controller which is bound to an nstableview. I also have
I have a NSTreeController which array is bound to a items (custom) property of
I have an NSTableView which is bound to an NSArrayController. I would like to
I'm writing my first master detail view in Cocoa. My data model is really
I have an ArrayController which is periodically updated. It has a sorted computed property

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.