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

  • SEARCH
  • Home
  • 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 6248941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:08:59+00:00 2026-05-24T13:08:59+00:00

I implemented a KVC validation method that is called by coredata, but is not

  • 0

I implemented a KVC validation method that is called by coredata, but is not being called when I call
person.name = @”alice”;

is there a reason why KVC validation methods, in this case,


- (BOOL)validateName:(id *)ioValue error:(NSError **)outError {
    NSLog(@"validateName is validating...");    
    // ...    
}

is not being called when setting a value via property expression?

Another problem is that I can’t get this to work either:


[person setValue:@"ok" forKey:@"name"];

My NSLog line NEVER gets called.

Anything I’m missing?

This class is a subclass of NSManagedObject.

Does that matter?

Thanks,
Jamie

  • 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-05-24T13:09:00+00:00Added an answer on May 24, 2026 at 1:09 pm

    According to the Managed Object Validation documentation, validation methods are not run until the context is saved, or until you manually validate (with -validateForUpdate:, -validateForInsert:, or -validateForDelete:).

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

Sidebar

Related Questions

I implemented an rpc call. It works on local machine but does not work
I implemented a custom list view, but now there's no visual feedback that an
Is there a way to do something similar to KVC but use the message
I implemented several activities in a wizard-style, that is, there's a next and a
I implemented a drop down navigation menus in my blog, but it's not working
I implemented a small OOP library in Lua, and two things are not quite
Having implemented CLogClass to make decent logging I also defined macro, but it works
NSCollectionView was introduced in OS X 10.5, and is not yet implemented in Cocotron.
I implemented a quick search in my application. But when I turned the screen,
I implemented a feature that lets users set default profile photos and photo-album cover

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.