i'm using cakephp 3.0.
lets say that i have a form that represents an invoice and the invoice items. the invoice has many invoice items relation. the form has some inputs for the invoice, and 10 rows with inputs for the invoice items: item code, item qty, item price, etc...
The invoice has his own model/controller, also the invoice item has his own model/controller.
Not always all the 10 rows are filled with invoice items and you do not wants that the validation rules be applied to these rows that are not used. the question is, what is the best approach to accomplish this?