This is the table structure I am using. (http://pastebin.com/c0yhV7Fv) The issue I am having is that I am unable to require only home phone, instead due to the way it is setup, it requires all phone fields if I put ‘phone’ in my rules. How would I get it to only require ‘home’ or any other specific phone fields I want to require?
The rules apply to model’s attributes only by the model’s validate() method usually called by save(). In fact, how can one check a rule on the related table when there are not yet records in both tables?
You can try different approuch. Foe example, if you provide a composite form containing person’s data together with telephone numbers, your controller can check the presence (or absence) of home telephone number.