But what does "If there are any validation errors, the corresponding input fields will be highlighted automatically, just like the single model input we described earlier on." mean?
in my Evaluation.php(model) should i put
array('evaluation_mark','required'),
or
foreach($questions as $i=>$question){array("[$i]evaluation_mark",'required'),}
A validator is always tied to a model so in your case you would use
array('evaluation_mark','required')
In fact it is exactly the same thing as if you would use a single model. If you validate a model and validation fails you can get the errors by calling $model->getErrors(). So this part:
Hi Haensel.Is it correct with what i done as below?
><?php echo $form->radioButtonList($model,"[$i]evaluation_mark",array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5'),array('separator' => " | ", 'labelOptions'=>array('style'=>'display:inline')));?>
<?php echo $form->error($model,"[$i]evaluation_mark"); ?> // I am not sure about this as after i create 'save; button it didn't save anything if i leave the radiobutton blank but it also doesn't show any warning message