Hi every one, i want to do a model validation for one model many times.
i mean by that that for example if i have "Person" as model, this model wil be validated many time and displays errorSummary for this validation. i give an example with Person model that contain 1 field colled "name"
create.php
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'category-form',
'enableAjaxValidation'=>false,
'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>
<?php for($i=1;$i>10;$i++) : ?>
<div class="row">
<?php echo $form->labelEx($model,'name'); ?>
<?php echo $form->textField($model, 'name'); ?>
<?php echo $form->error($model,'name'); ?>
</div>
<?php endfor ; ?>
<div class="row buttons">
<?php echo CHtml::submitButton('Save'); ?>
</div>
<?php $this->endWidget(); ?>
How can i validate this type ? and how can $form->errorSuùùary display errors?