Get all validation messages (including nested models).

@return array
11917
public function getErrors(): array
    {
        if ($this->errors === null) {
            $this->errors = $this->fetchErrors();
        }

        //Making sure that each error point to proper input origin
        return $this->mapper->mapErrors($this, $this->validateNested($this->errors));
    }
1269065
public function getMessages()
    {
        $messages = array();

        foreach ($this->getDescendants() as $widget) {
            $messages = array_merge($messages, $widget->getMessages());
        }

        return $messages;
    }
292492
public function all()
    {
        return array_merge($this->messages[self::DURABLE], $this->messages[self::NOW]);
    }
550515
public function getValidAttribs()
    {
        return array_combine(
            array_keys($this->validAttribs),
            array_map(function ($ref) {
                return $ref['attrib'];
            }, array_values($this->validAttribs))
        );
    }
1251456
public static function checkModel($errors, Model $model) : array
    {
        $output = [];
        if (!is_array($errors)) {
            return $output;
        }
        foreach ($errors as $attribute => $message) {
            $obj = $model;
            if (strpos($attribute, '.') !== false) {
                list($nested, $attr) = explode('.', $attribute);
                if (isset($obj->{$nested}) && $obj->{$nested} instanceof Model) {
                    $obj       = $obj->{$nested};
                    $attribute = $attr;
                }
            }
            if ($obj->hasProperty($attribute)) {
                $output[Html::getInputId($obj, $attribute)] = $message;
            } else {
                $output[] = $message;
            }
        }
        return $output;
    }
1069674
public function getMessages()
    {
        $messages = parent::getMessages();

        if ($this->model !== null) {
            foreach ($this->model as $row) {
                foreach ($this->columns as $column) {
                    $messages = array_merge(
                        $messages,
                        $column->getMessages($row)
                    );
                }

                foreach ($this->spanning_columns as $column) {
                    $messages = array_merge(
                        $messages,
                        $column->getMessages($row)
                    );
                }
            }

            foreach ($this->extra_rows as $row) {
                if ($row instanceof SwatTableViewWidgetRow) {
                    $messages = array_merge($messages, $row->getMessages());
                }
            }
        }

        return $messages;
    }
544518
public function errorMessages()
    {
        $messages = array();

        // Loop over each field
        foreach ($this->errors as $field => $errors) {
            $messages[$field] = array();

            // Loop over the fields errors
            foreach ($errors as $validation => $error) {
                $vars = array_merge(
                    array('field' => Language::translate($field)),
                    $error
                );
                unset($vars['message']);
                $messages[$field][] = Language::translate($error['message'], $vars);
            }
        }

        return $messages;
    }
291529
protected function getValidationRules(): array
    {
        $validationRulesFromRepository = $this->repository->getModelValidationRules();

        return !empty($validationRulesFromRepository) ? $validationRulesFromRepository : $this->validationRules;
    }
302045
public function getMessages(bool $recursive = true): array {
		if (!$recursive) return [];
		
		$messages = [];
		
		foreach ($this->validationResults as $validationResult) {
			$vrMessages = $validationResult->getMessages();
			
			if (empty($vrMessages)) continue;
			
			array_push($messages, ...$validationResult->getMessages());
		}
		
		return $messages;
	}
647141
public function getValidationMessage()
    {
        $json = $this->getJsonResponse();
        if ($json && $json->errors && $json->errors->message) {
            return $json->errors->message;
        } else {
            return 'Unknown validation error';
        }
    }
1060883
protected function getModelArguments() : array
    {
        $models = $this->argument('models');

        if (empty($models)) {
            $models = [
                '\Laranix\Auth\Email\Verification\Verification',
                '\Laranix\Auth\Password\Reset\Reset'
            ];
        }

        return $this->validateArgs($models);
    }
1167380
public function getMessages()
    {
        return $this->conversation->getMessages($this->user, $this->getPaginationParams(), $this->deleted);
    }
566320
public function getValidationMessage(): array{
        $fields = [];
        foreach ($this->validations as $validation) {
            /* @var Validation $validation */
            if ($validation->getStatus() == Validation::ERROR) {
                if (!isset($fields[$validation->getField()])) {
                    $fields[$validation->getField()] = [];
                }
                var_dump($validation->getMessage());
                array_push($fields[$validation->getField()], $validation->getMessage());
            }
        }
        return $fields;
    }
550526
protected function get_messages() {
        global $SESSION;

        $messages = array();
        if (!empty($SESSION->lesson_messages) && is_array($SESSION->lesson_messages) && array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
            $messages = $SESSION->lesson_messages[$this->properties->id];
            unset($SESSION->lesson_messages[$this->properties->id]);
        }

        return $messages;
    }
558277
public function getModelValidationRules()
    {
        $optionsRules = $this->getOption('rules');

        //if the 'rules' option was provided for this model, it takes precedent
        if (is_array($optionsRules)) {
            return $optionsRules;
        }

        //otherwise look for the rules as a static property on the model
        return $rules = $this->getModelStaticValidationRules() ?: array();
    }
321837
protected function getFieldsExistingMessages()
    {
        $fieldsMessages = [];
        $formObject = $this->getFormObject();

        if ($formObject->formWasSubmitted()
            && $formObject->hasFormResult()
        ) {
            foreach ($this->getFormObject()->getConfiguration()->getFields() as $field) {
                $fieldsMessages[$field->getName()] = $this->getSingleFieldExistingMessages($field);
            }
        }

        return $fieldsMessages;
    }
1271719
protected function messages()
    {
        // field.condition => translation
        return [
            'nickname.required'  => trans('HCACL::users.validator.nickname.required'),
            'nickname.unique'    => trans('HCACL::users.validator.nickname.unique'),
            'nickname.min'       => trans('HCACL::users.validator.nickname.min', ['count' => 3]),
            'email.required'     => trans('HCACL::users.validator.email.required'),
            'email.unique'       => trans('HCACL::users.validator.email.unique'),
            'email.min'          => trans('HCACL::users.validator.email.min', ['count' => 5]),
            'password.required'  => trans('HCACL::users.validator.password.required'),
            'password.min'       => trans('HCACL::users.validator.password.min', ['count' => 5]),
            'password.confirmed' => trans('HCACL::users.validator.password.confirmed'),
            'roles.required'     => trans('HCACL::users.validator.roles.required'),
        ];
    }