Yii View Required Filed in Validation

Hi guys

I have an small problem with validations and form fileds :-\ when we make a form (model/action controller/view) in view file required filed did not marked * and end users faces with error message too many times I want to know that I should do that manually in HTML or Yii has an approach for that.

The * is generated by CHtml::activeLabelEx() and can also be adjusted to your needs.

I don't understand what you mean with "faces with error message too many times". Can you describe further?

Quote

The * is generated by CHtml::activeLabelEx() and can also be adjusted to your needs.

I don't understand what you mean with "faces with error message too many times". Can you describe further?

because end users did not know which fields is required and which one is not and they faces with error tanx for reply Mike.

Following each input field, you can add the following so that the error message appears next to the place where it occurs.

<?php echo CHtml::error($model,$attribute); ?>