Hello There is a validation rule
array('email', 'unique', 'message'=>'This email already exists','on' => 'register'). The problem is that others when errors occur in other validators ( required,compare , etc.), the message in view is displayed on the screen, but with unique there is no response. Tell me how to properly set the output of this error in case of occurrence? Thank.
$this->pageTitle = Yii::app()->name . ' - Registration'; ?> <div class="form"> <?php $form = $this->beginWidget('CActiveForm', array( 'id' => 'login-form', 'enableClientValidation' => true, 'clientOptions' => array( 'validateOnSubmit' => true, ), )); ?> <p class="note">Fields with <span class="required">*</span> are required.</p> <div class="row"> <?php echo $form->labelEx($model, 'username'); ?> <?php echo $form->textField($model, 'username'); ?> <?php echo $form->error($model, 'username'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'email'); ?> <?php echo $form->textField($model, 'email'); ?> <?php echo $form->error($model, 'email'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'password'); ?> <?php echo $form->passwordField($model, 'password'); ?> <?php echo $form->error($model, 'password'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'passwordConfirm'); ?> <?php echo $form->passwordField($model, 'passwordConfirm'); ?> <?php echo $form->error($model, 'passwordConfirm'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton('Registration'); ?> </div> <?php $this->endWidget(); ?> </div>