I want to set a validor for a field on configure (), but the field can
be required or not, it depends on the value of another field. Now I
need set the condition following the value of that filed but I can
find the good function, for having that value.

I have to use it one configure() function.

class FormuleForm extends BaseFormuleForm
{

  public function configure()
  {

///  I have tried this, but it's not ok

  if ($this->getValue('idsitecompactage')==2)
          {$this->validatorSchema['commentaire']=new
sfValidatorString(array('required' => true));
          }
*******
}
}

-- 
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 [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