If I pass validatorSchema like as argument of my custom validator, then I can 
modify options on that fields.  The example I posted earlier works. But when 
I embed myForm into another form, it stops working due to validatorSchema 
cloning.

I am going to create enhancement ticket on this topic.

Dňa St 15. Október 2008 21:34 adrive napísal:
> myForm extends sfForm {
>   public function setUp() {
>         ...
>         $this->validatorSchema['column']->setOption('required', false);
>       $this->setPreValidator(new
> sfValidatorCallback(array('arguments'=>array('vs'=>$this->validatorSchema),
> 'callback'=>array($this, 'validateGroup'))); }
>   public function validateGroup($validator, $values, $args) {
>     // this pass without error, but column is not required
>     $args['vs']['column']->setOption('required', true);
>     return $values;
>   }
> }

-- 
adrive

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to