I find that the validation rule ‘inList’ in cakephp 1.3.10 is not working properly. I Have this on my validation
'vote' => array(
'rule' => 'inList', array(1,2,3),
'allowEmpty' => false,
'required' => true,
'message' => 'error_vote'
)
This is on my View
echo $form->input('User.vote', array(
'type' => 'radio',
'legend' => __("form_vote", "true"),
'class' => 'vote',
'options' => array('1' => 'One', '2' => 'two', '3' => 'Three' ),
));
Can someone let meknow what I’m doing wrong? Thanks.
There’s a syntax error,
ruleneeds to be an array: