If you are happy with error aggregation for your form, you can do it as follows: - Make Zend_Form without validators - In the view, make a Doctrine object and call isValid () - If they are invalid, do not save, but show the error form again
However, I would recommend you either - Write both validators for your Zend_Form and your model. - Write validators for your Zend_Form that take the model and the Doctrine field as input, and then check the material against your model.
I believe the latter option can be a very general library, useful for even inclusion in the Zend Framework. However, it is tiring to write it in the right way.
Peter Smit
source share