hanse
hanse

Reputation: 1126

Doctrine 2 Validations

It does not seem like Doctrine 2 has built-in validation. Is this a feature that will be supported in the future? How and where do you validate your Doctrine 2 entities?

Guess I have to write my own validation engine for Doctrine.

thanks

Upvotes: 0

Views: 543

Answers (2)

Guilherme Blanco
Guilherme Blanco

Reputation: 1244

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

Upvotes: 1

Vladimir Mihailenco
Vladimir Mihailenco

Reputation: 3382

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.

Upvotes: 0

Related Questions