Determines whether the managed object's current state is valid.
- iOS 3.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Data
If the receiver's current state is invalid, upon return contains an instance of
NSErrorthat describes the problem.
YES if the receiver's current state is valid, otherwise
NSManaged’s implementation iterates through all of the receiver’s properties validating each in turn. If this results in more than one error, the
user dictionary in the
NSError returned in
error contains a key
NSDetailed; the corresponding value is an array containing the individual validation errors. If you pass
NULL as the error, validation will abort after the first failure.