validate input data with symfony, doctrine or zend_validate?
im using symfony with doctrine and zend.
i wo开发者_JAVA技巧nder if i wanna validate the user input data, should i use validation from symfony, zend or even doctrine?
i think i should go with symfony, but are there times the validation from zend or doctrine would be better?
thanks
Depends on how you create your forms.
If you use the form framework of symfony, there's no reason not to use it for validation as well.
If you use Zend_Form, I guess you're better off validating with Zend.
Also: doctrine only validates data such as "this has to be an integer" or "this has to be a string <50 characters long", the form framework can do much more than that.
精彩评论