I want to do the same. Any help??? 2011/4/16 Holger <holger.k...@100days.de>
> Hi all, > > what I'm trying to achieve is to create fully dynamic forms out of a > yaml config. The generation of the form-object itself should not be a > problem utilizing Form::add(<FieldType>) according to the yaml config. > The problem I'm running into is when validating the domain object > assigned to the form via Form::bind(<request>, <domainobject>) and > Form::setDataClass(<domainobject_cassname>). Validation only takes > place if I have the domain object's class properties explicitly > declared inside the class (public $email, public, $name ....). This > would lead in having a yaml config for form-definition/validation- > rules AND a domain object with the properties to be validated > explicitly declared. I would like to have a standard domain object for > all form definitions where the properties to be validated are declared > at runtime. > > I've tried to set properties dynamically at runtime into the domain- > object but that doesn't work because the standard implementation of > the validator component always uses the classname of the to gather the > class's metadata and runtime generated properties aren't included in > metadata because the aren't explicitly declared in the standard domain > object I've mentioned above. > It would be great if somone could give me some hints on how to get > such a validation scenario working. > Thanks in advance, > regards, > Holger > > -- > 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 > -- 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