model validated many times

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?

Validate one time and display many time how much you want

like that:

in controller:


$model->validate();

in view:




<?php echo CHtml::errorSummary($model);?>

<?php echo CHtml::errorSummary($model);?>

...



if too many times you should display use for.

But how interesting, why you need display one thing many times. :)

i didn’t mean that type of repeating model :)

i mean valideting many instances of one model.

i found the way in this topic but i’m trying it now and i don’t now if it’s perfect or not. i’ll tell you when i finish testing it ;)