0

I need to compare new password with old one that they are unequal it`s a code where new password and password confirm compares, but what I can do for my matter?

['password_confirm', 'compare', 'compareAttribute'=>'password_new', 'message'=>"пароль и подтверждение пароля не совпадает" ],
Andrii Rusanov
  • 4,405
  • 2
  • 34
  • 54
Vadik
  • 3
  • 4

1 Answers1

0

I found a resolusion:

    public function rules()
    {
        return [
['password_new', 'in', 'range' => [$this->password_current], 'not' => true, 'message'=>"new password equals with old one"]
];
    }
Vadik
  • 3
  • 4