[symfony-users] Re: Dynamic form validation

2010-03-21 Thread Vikos
Symfony version : 1.4 On márc. 21, 17:40, Vikos make.webp...@gmail.com wrote: Hi! (My english is not so perfect so previously sorry for mistakes!!!) I need a form witch can dynamically change the validator schema by the POST's datas. Db shcema: There is the workers. They have contacts (

[symfony-users] Re: Dynamic form validation

2010-03-21 Thread Richtermeister
Hey Vikos, the solution is to override the bind() (or doBind()) method and adjust the validators based on the values passed. Then you call the parent bind() method to trigger the actual validation. Daniel On Mar 21, 9:42 am, Vikos make.webp...@gmail.com wrote: Symfony version : 1.4 On

[symfony-users] Re: Dynamic form validation

2010-03-21 Thread xplo
Or do a callback validator Jon wants to validate a form value but the validation depends on another form field. As Jon does not know how to do it with symfony 1.1, he called the expert. This post will explain how to accomplish this kind of conditional validation by using a post validator.