Get an array with all validation errors
@return array
768650
public function getValidationErrors()
    {
        $fields = $this->getFields();
        if (!$fields) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            if ($field instanceof AbstractFormField) {
                if (!$field->isValid()) {
                    $result = array_merge($result, $field->getErrorMessages());
                }
            }
        }

        return $result;
    }
262724
public function errorArray()
    {
        $messages = [];
        foreach ($this->failures as $key => $rule) {
            foreach ($rule->getFailures() as $fail) {
                $messages[] = $fail;
            }
        }
        return $messages;
    }
645701
public function getErrors()
    {
        $errors = array();

        /**
         * @var EntityContainerInterface $entityContainer
         */
        if (!is_null($entityContainer = current($this->getEntityContainerMap()->getAll()))
            && $entityContainer->hasErrors()
        ) {
            $errors = $entityContainer->getErrors();
        }

        return $errors;
    }
399953
public function getValidationErrors()
    {
        $errors = [];
        if (isset($this->response->errors)) {
            foreach ($this->response->errors as $error => $reasons) {
                $errors[] = [
                    'attribute' => $error,
                    'reason'    => $this->getValidationReasonsAsString($reasons),
                ];
            }
        }

        return $errors;
    }
586750
public function get_error(){
    if ( $this->error ){
      return [
        'code' => $this->error,
        'text' => $this->class_cfg['errors'][$this->error]
      ];
    }
    return false;
  }
761038
public function getError()
    {
        if ($this->errorCode !== null || $this->success === false) {
            return [
                'code'    => $this->errorCode === null ? self::UNKNOWN_ERROR_CODE : $this->errorCode,
                'message' => $this->errorMessage === null ? self::UNKNOWN_ERROR_MSG : $this->errorMessage
            ];
        } else {
            return null;
        }
    }
1168716
public static function errors()
    {
        $result                    = array();
        $result['error_reporting'] = error_reporting();
        $errTypes                  = self::_getErrorTypes();

        foreach ($errTypes as $errTypeKey => $errTypeName) {
            if ($result['error_reporting'] & $errTypeKey) {
                $result['show_types'][] = $errTypeName . ' (' . $errTypeKey . ')';
            }
        }

        return self::i()->dump($result, '! errors info !');
    }
1082995
public function getValidators()
    {
        $this->validators = $this->generateInputs();

        $translatedInputs = [];

        foreach ($this->validators as $key => $validator) {
            $translatedOperators = [];

            foreach ($validator['availableOperators'] as $availableOperators) {
                $translatedOperators[$availableOperators] = Operators::getI18n(
                    $this->translator,
                    $availableOperators
                );
            }

            $validator['availableOperators'] = $translatedOperators;

            $translatedInputs[$key] = $validator;
        }

        $validators = [
            'inputs'       => $translatedInputs,
            'setOperators' => $this->operators,
            'setValues'    => $this->values
        ];

        return $validators;
    }
581005
public function allErrorArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allError());
        }
        return $r;
    }
38654
public function getErrorCodes()
    {
        $errors = array();

        if (count($this->errorCodes) > 0)
        {
            foreach ($this->errorCodes as $error)
            {
                switch ($error)
                {
                    case 'timeout-or-duplicate':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'Timeout or duplicate.',
                        );
                    break;

                    case 'missing-input-secret':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The secret parameter is missing.',
                        );
                    break;

                    case 'invalid-input-secret':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The secret parameter is invalid or malformed.',
                        );
                    break;

                    case 'missing-input-response':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The response parameter is missing.',
                        );
                    break;

                    case 'invalid-input-response':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The response parameter is invalid or malformed.',
                        );
                    break;

                    case 'bad-request':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The request is invalid or malformed.',
                        );
                    break;

                    case 'internal-empty-response':
                        $errors[] = array(
                            'code' => $error,
                            'name' => 'The recaptcha response is required.',
                        );
                    break;

                    default:
                        $errors[] = array(
                            'code' => $error,
                            'name' => $error,
                        );
                }
            }
        }

        return $errors;
    }
1076658
public function getErrors()
    {
        if (!$this->validator || !$this->validator instanceof Validator) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Form %s was not validated. To validate it, call "isValid" method before retrieving the errors',
                    get_class($this)
                )
            );
        }

        return $this->validator->getMessageBag()->getMessages();
    }
1018072
public function validated(): array
    {
        $rules = $this->container->call([$this, 'rules']);

        return $this->only(collect($rules)->keys()->map(function ($rule) {
            return str_contains($rule, '.') ? explode('.', $rule)[0] : $rule;
        })->unique()->toArray());
    }
576574
public function getFailures(): array
    {
        $errors = [];

        foreach ($this->getActionExceptions() as $actionException) {
            $errors[] = $actionException->getMessage();
        }

        return $errors;
    }
607724
public function getValidators()
    {
        $allValidatorData = $this->validators->
                                            toArray(PriorityQueue::EXTR_DATA);
        foreach ($allValidatorData as $key => $validatorData) {
            $allValidatorData[$key] = $validatorData['instance'];
        }
        return $allValidatorData;
    }
1222545
public function validationRules():array
    {
        $rules = [];

        foreach ($this as $control) {
            $rule = $control->getRule();
            if (!empty($rule)) {
                $rules[$control->getName()] = $control->getRule();
            }
        }

        return $rules;
    }
384320
public function getAllErrors() {

        $errors = array();
        // First the table itself
        if ($this->getError()) {
            $errors[] = $this->getError();
        }
        // Delegate to fields
        if ($fields = $this->getFields()) {
            foreach ($fields as $field) {
                if ($field->getError()) {
                    $errors[] = $field->getError();
                }
            }
        }
        // Delegate to keys
        if ($keys = $this->getKeys()) {
            foreach ($keys as $key) {
                if ($key->getError()) {
                    $errors[] = $key->getError();
                }
            }
        }
        // Delegate to indexes
        if ($indexes = $this->getIndexes()) {
            foreach ($indexes as $index) {
                if ($index->getError()) {
                    $errors[] = $index->getError();
                }
            }
        }
        // Return decision
        if (count($errors)) {
            return $errors;
        } else {
            return false;
        }
    }
702736
public function exportErrors()
    {
        $ret = [];
        foreach ($this->errors as $error) {
            $ret[] = $error->export();
        }
        return $ret;
    }