Garden\Validation::getErrorsFlat PHP Method

getErrorsFlat() public method

The errors are internally stored indexed by field. This method flattens them for final error returns.
public getErrorsFlat ( ) : array
return array Returns all of the errors.
    public function getErrorsFlat()
    {
        $result = [];
        foreach ($this->errors as $errors) {
            foreach ($errors as $error) {
                $result[] = $error;
            }
        }
        return $result;
    }