Hi Holger,

You can use the Callback constraint for this purpose. You can see an
example of its usage in DelegatingValidator::validateFormData():
https://github.com/symfony/symfony/blob/form/src/Symfony/Component/Form/Validator/DelegatingValidator.php

What is necessary for this approach:
- a common base class for your domain objects
- a callback method either in that base class or a static callback
method somewhere else
- a Callback constraint for this base class (see
https://github.com/symfony/symfony/blob/form/src/Symfony/Component/Form/Resources/config/validation.xml#L8
for an example - if you use a method in your base class, you can
simply provide the name of that method instead of the {Class, Method}
array)

Bernhard

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to