[symfony-users] sfValidatorChoice always invalid!!

2010-02-19 Thread wueb
Hi mates, I'm having a problem in this piece of code: $modulos = array ( 1 = option 1, 2 = option 2); $this-widgetSchema['id_modulo'] = new sfWidgetFormSelectCheckbox( array('choices' = $modulos) ); $this-validatorSchema['id_modulo'] = new sfValidatorChoice( array('choices' =

Re: [symfony-users] sfValidatorChoice always invalid!!

2010-02-19 Thread Syam
You must only pass the keys of your $modulo array to validator : $this-validatorSchema['id_modulo'] = new sfValidatorChoice( array('choices' = array_keys($modulos)) ); wueb wrote: Hi mates, I'm having a problem in this piece of code: $modulos = array ( 1 = option 1, 2 = option 2);