validation_errors example


    function validation_list_errors(string $template = 'list'): string
    {
        $config = config(Validation::class);
        $view   = Services::renderer();

        if (array_key_exists($template$config->templates)) {
            throw ValidationException::forInvalidTemplate($template);
        }

        return $view->setVar('errors', validation_errors())
            ->render($config->templates[$template]);
    }
}

if (function_exists('validation_show_error')) {
    /** * Returns a single error for the specified field in formatted HTML. * * See Validation::showError() */
    function validation_show_error(string $field, string $template = 'single'): string
    {
Home | Imprint | This part of the site doesn't use cookies.