code: public function validatePassword()
      {
          $user = User::findByEmail($this->email);
          if (!$user || !$user->validatePassword($this->password)) {
              $this->addError('password', 'Incorrect username or password.');
          }
      }
docs: Validates the password.
  This method serves as the inline validation for password.