Hour 22. Managing Validation

What You’ll Learn in This Hour:

Exploring the validation interface you do not have to write

Performing validations

Validation for Free

Hour 18, “Validating Data,” p. 317, shows you how to set up validation rules in your Core Data model. This is a good start, but you need to apply them to keep your data valid. The whole point of implementing validation rules in the database is to avoid or at least minimize the code you have to write to keep your data clean. Not only does this save time, but it also helps to reduce the possibility of validation code being written incorrectly or of loopholes occurring so that under some circumstances, the validation tests are not even performed.

There are two basic approaches ...

Get Sams Teach Yourself Core Data for Mac® and iOS in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.