Required dropDownList rules not working

My code is:




<?php echo $form->dropDownList($recalls,'grade',array('0'=>'Good','1'=>'Bad'), array('prompt'=>'Rate specialist'));?>

 <?php echo $form->error($recalls,'grade'); ?>



and rules is:




	public function rules()

	{

		// NOTE: you should only define rules for those attributes that

		// will receive user inputs.

		return array(

			array('name, phone, report, grade', 'required'),

			array('phone', 'numerical', 'integerOnly'=>true),

			// The following rule is used by search().

			// @todo Please remove those attributes that should not be searched.

			array('id, name, phone, idm, report, good, bad', 'safe', 'on'=>'search'),

		);

	}



When I sending data, dropdownlist field show error message ‘Cannot be blank’?

You did not explain what is the problem you want to solve?

The dropdownlist field is “grade”, and in the rules the field “grade” is set as required so it’s OK that if nothing is selected in the dropdown you get the message “cannot get blank?”