I would like to know how to implement validation in Core Data. What I would like to do is make sure that the attribute is unique within the scope of the associated parent. In other words, I'm wondering how to implement the validates_uniqueness_of :field, :scope => :parent ,: validates_uniqueness_of :field, :scope => :parent (from rails / activerecord) paradigm in Core Data.
For example, suppose I create two models โ one for Blog and one for Post. Each column has a title attribute. Different blog objects may have posts with the same headings, but how can I check the uniqueness of the title within the blogs?
Thanks!
Neal l
source share