public function fieldHasError($fieldName)
    {
        foreach ($this->errors as $error) {
            if ($error->getParam() == $fieldName) {
                return true;
            }
        }

        if (!$this->isSubmitted()) {
            return false;
        }

        if (isset($this->validator) && $this->validator->fieldHasError($fieldName)) {
            return true;
        }
    }