This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Symfony2 + FOSUserbundle + dynamic change validation groups

Discuss Symfony 2 bundles here

Symfony2 + FOSUserbundle + dynamic change validation groups

by coder62 » Tue Jun 16, 2015 12:44 am

0
down vote
favorite


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/for ... ion-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?
coder62
Junior Member
 
Posts: 1
Joined: Tue Jun 16, 2015 12:42 am