[symfony-users] Re: How to retrieve the value of a field in configure() function

2010-05-24 Thread Tom Ptacnik
I think callback is the right way. http://blog.rajatpandit.com/2010/01/01/using-sfvalidatorcallback/ On 22 kvě, 17:48, Stéphane wrote: > Wouldn't it be good too to validate them as not required then use an > sfValidatorCallback using $this(form)->setPostValidator(new > sfValidatorCallback()) ?

Re: [symfony-users] Re: How to retrieve the value of a field in configure() function

2010-05-22 Thread Stéphane
Wouldn't it be good too to validate them as not required then use an sfValidatorCallback using $this(form)->setPostValidator(new sfValidatorCallback()) ? This is used when one field validation depends on some others. Another way is to make the $required of your validators being options, using $thi

[symfony-users] Re: How to retrieve the value of a field in configure() function

2010-05-22 Thread Johannes
You need to exchange the validator schema of the form with your own validator schema class, and overwrite the preClean() method there. This is the only way to ensure that your form behaves the same whether it is used standalone or embedded elsewhere. Johannes On 21 Mai, 15:04, kadia wrote: > I