Using CakePHP 1.3.
I've created a form with a primary model that 'hasMany' secondary models.
However, the fields for the secondary models are created by Javascript ("add one" buttons). While they adhere to the CakePHP naming conventions, I'm wondering:
How do I hook up any kind of server-side, CakePHP validation to these fields, and how can I re-show them, along with their error messages, should they fail validation (since they're created on the fly)?
I'm assuming that my controller or view will actually have to determine if there was data posted for the given models, attempt to validate them, and if necessary I will have to "manually" create and show the HTML for the previously-dynamically-created fields. Is that correct?