public function getError() {
        if ($this->error) {
            return $this->translate($this->error);
        }
        if ($this->form->model && is_object($this->form->model) && $this->form->model->hasErrors($this->name)) {
            $errors = $this->form->model->getErrors($this->name);
            foreach ($errors as &$message) {
                $message = $this->translate($message);
            }
            return $errors;
        }
        return null;
    }