Answer the question
In order to leave comments, you need to log in
Why doesn't compare work?
validation rules in the model:
public function rules()
{
return [
['password_compare', 'compare', 'compareAttribute'=>'password', 'message'=>"Пароли не совпадают"],
];
}
<div class="content_add-center-item">
<div class="content_add-center-item-title">
Новый пароль:
</div>
<div class="content_add-center-item-field">
<?= $form->field($model, 'password')->textInput() ?>
</div>
</div>
<div class="content_add-center-item">
<div class="content_add-center-item-title">
Повторите новый пароль:
</div>
<div class="content_add-center-item-field">
<?= $form->field($model, 'password_compare')->textInput() ?>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question