Friday, 23 August 2013

Symfony2 : Recursive Validation

Symfony2 : Recursive Validation

I've got an entity with some validators (not a form).
So I use $validator->validate($entity), but it doesn't validate my
sub-ojects (the entity class has some others entity classes with some
validators).
Is there an "automatic" way to do this, or I have to do
$errorList->addAll($validator->validate($entity)); for each of them ?

No comments:

Post a Comment