Edit on GitHub
Jump to docs navigation

Twig Components / Methods / form_errors

Note: You are currently reading the documentation for Bolt 5.0. Looking for the documentation for Bolt 5.2 instead?

form_errors(form_view) is a Twig function to render any errors for the given field.

{# render only the error messages related to this field #} 
{{ form_errors(form.name) }}
{# render any "global" errors not associated to any form field #} 
{{ form_errors(form) }}

Caution: In the Bootstrap 4 form theme, form_errors() is already included in form_label(), see “Error Messages”.

Source: Forms



Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.