/** * Validates the password. */ public function validatePassword() { if (empty($this->password)) { throw new UserInputException('password'); } // check password if (!$this->user->checkPassword($this->password)) { throw new UserInputException('password', 'false'); } }