public function updateErrorBox($form, $result, $errors)
    {
        if (($form->isSubmitted() && $result !== true) || count($errors) > 0) {
            if (is_string($result)) {
                $this->addError(new Error(
                    Error::GENERAL_ERROR,
                    $result
                ));
            } else if (count($errors) > 0) {
                foreach ($errors as $error) {
                    $this->addError($error);
                }
            } else {
                $this->addError(new Error(
                    Error::UNKNOWN_ERROR,
                    ''
                ));
            }
        }
    }