I have a model and displaying radiobutton list using activeradiobutton list…
I have problems validating, if radiobutton are selected or not.
echo CHtml::activeRadioButtonList($model,‘id’,$listCategory,array(‘separator’=>’ '));
Above displays the radiobutton list but when i click on submit button it is not validating…I guess problems with validating rules…below are the rules.
public function rules() {
return array(
array('category','required'),
array('category', 'length', 'max'=>100),
array('description', 'safe'),
array('description', 'default', 'setOnEmpty' => true, 'value' => null),
array('id, category, description', 'safe', 'on'=>'search'),
);
}
id is primarykey, category is name, description is a textfield…This is default rules generated while creating model…