sfValidatorChoice is not working on multiple select element, my code
$this->form=new MyTestForm();
$options_array=array("php","python","java");
$widgetSchema["my_select"] =new sfWidgetFormChoice(array('choices' => $options_array,'multiple' => true,'expanded' => true ));
$validatorSchema["my_select"] = new sfValidatorChoice(array("choices" =>array_keys($options_array)));
Note: i have also tried using array_keys and by directly passing the array to sfValidatorChoice.
when i submit, it gives me Invalid
error(when checked) and Required
(when unchecked).
is there any error in parameters or is bug?