Form:Errors Tag

If a form submission encounters a validation error, you can use this tag to loop through the error messages and show your user where everything went south.


This tag can be used both as a conditional and as the data itself.

{{ form:set is="contact" }}
    {{ if {form:errors} }}
        <p>Oops, here's what went wrong:</p>
            {{ form:errors }}
                <li>{{ value }}</li>
            {{ /form:errors }}
    {{ /if }}

    {{ form:create }}
    {{ /form:create }}
{{ /form:set }}

form:errors is a Tag, not a variable. Wrap it with single braces when inside a conditional.


handle|is|in|form|formset string

Specify the name of the form. Only required if you do not use the form:set tag, or don't have a form defined in the current context.


Variable Type Description



This tag contains a primitive array. In each iteration, the {{ value }} will output a different error message. See the example above.

Betterify this page on Github!