Default Errors
Generates an HTML list of the error messages of a form. The filter returns an empty string when there are no errors. Use it with form.errors inside a form tag.
Example
Data
json
{
"form": {
"errors": {
"messages": {
"email": "The email field is required.",
"password": "The password must be at least 8 characters."
}
}
}
}liquid
{{ form.errors | default_errors }}Output
html
<div class="errors"><ul><li>The email field is required.</li><li>The password must be at least 8 characters.</li></ul></div>