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 to ...

Get Sams Teach Yourself Core Data for Mac® and iOS in 24 Hours, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.