Hi,
In my form I display fields from two models User and Role.
The problem is that although the Role is a required attribute in Role model it doesn’t appear in the error summary box.
this is my code:
<?php echo $form->errorSummary(array($model,$role)); ?>
where $model refer to main model(User) and $role to Role model
and
<tr>
<td>
<?php echo $form->labelEx($role,'Ruolo'); ?>
</td>
</tr>
<tr>
<td>
<?php echo $form->dropDownList($role,'Ruolo',CHtml::listData($role->GetMainRoles(),"IDRole","Ruolo"),array('prompt'=>'Seleziona')); ?>
<?php echo $form->error($role,'Ruolo'); ?>
</td>
</tr>
the label is marked as required but if I dont select any role and submit the role info is not added to errorSummary text.