update/validate embedded forms before saving in symfony
- by Stanislav Palatnik
I would like to validate an embedded form field before it gets saved in the database. Currently it will save an empty value into the database if the form field is empty. I'm allowing empty fields, but I want nothing inserted if the form field is empty.
Also quick question, how to alter field values before validating/saving an embedded form field?
$this-form-getObject works in the action, but $this-embeddedForm-getObject says object not found