I am getting an NSValidationErrorObject when saving my managed object context. I am trying to save a couple objects and they all get the same error (from the user info):
NSDetailedErrors = (
Error Domain=NSCocoaErrorDomain
Code=1680 "The operation couldn't be completed. (Cocoa error 1680.)"
UserInfo=0x5d96fb0 {NSValidationErrorObject=<Alert: 0x5bb1fb0> (entity: Alert; id: 0x5bb0600 <x-coredata:///Alert/tBA1FD03B-5157-4523-AB34-A7C05869778F12> ;
data: {
...
identifier = "cap_024_0713_320117515151";
...}),
NSValidationErrorKey=identifier,
NSLocalizedDescription=The operation couldn\U2019t be completed. (Cocoa error 1680.),
NSValidationErrorPredicate=SELF MATCHES "",
NSValidationErrorValue=cap_024_0713_320117515151}
The thing that is confusing me is that I can find no reason for that key to cause a validation error. It is optional and as far as I know there is no validation enabled on it. Is there some other place to check for validation to be set up? Could this error message be reporting the wrong field?

Additional tests that i have now performed:
- Saving after each update. No change.
- Fresh store. No change.
- No warnings mentioned regarding reserved words.
- No manual validation whatsoever in the .m files.
- If I delete the “identifier” attribute, it works.
- If I add it back as “alertIdentifier” it does not work, but I used auto-migration so I’ll try it again without migration.
- If I delete the “identifier attribute” and add it again, making it look the same as before, it works!
the attribute name
identifiercould be problematic – trymyIdentifierand see if it works(i had a problem calling something
descriptionbecause of the meaning in Obj-C)Edited to reflect comments and results:
Delete the attribute all together, test to see if another failure crops up, then add it back if no error is present.
Deleting the “identifier” attribute and adding it again in Xcode fixed the issue. This was probably caused by an Xcode Core Data modeler bug.