Doctrine 2 Validations
It does not seem like Doctrine 2 has built-in validation. Is this a feature that will be supported in开发者_如何学JAVA the future? How and where do you validate your Doctrine 2 entities?
Guess I have to write my own validation engine for Doctrine.
thanks
I think your best alternative is using Symfony Validator component (https://github.com/symfony/Validator), which can be used as a standalone component. It implements JSR-303 Bean Validation (http://beanvalidation.org/1.0/spec), presenting a quite interesting solution to be tied with Doctrine. For filtering, you could use DMS Filter component (https://github.com/rdohms/DMS-Filter).
Cheers,
Guilherme Blanco
There is a separate project for 2.0 branch: DVAL (Doctrine Validator), http://www.doctrine-project.org/jira/secure/Dashboard.jspa . I do not know his current status, because I am very satisfied with Zend_Form + Zend_Validate. Also most frameworks contain validation feature, so you do not need to implement your own.
精彩评论