I am new with Symfony2 and so I am with FOSUserbundle, the registration form I wrote got different fields mandatory based on if it is a company or private person, I set it up etc and if I hardcode the valdiation group in the fos config it will work, but what I need is to set it up dynamic based on the form submit data, I tried to follow: http://symfony.com/doc/current/book/forms.html#book-forms-validation-groups
Seeing that FOSUserbundle use the deprecated OptionsResolverInterface , I even tried it with that one, but whatever I do it is never called.
So my question is kinda, what is the right approach with that bundle to change the valdiation group on the fly based on the submitted data?