Created
January 24, 2019 02:49
-
-
Save crmpicco/640a061ad2a52407911ebff45ff22b11 to your computer and use it in GitHub Desktop.
Bootstrap 3 form_errors block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% block form_errors -%} | |
{% if errors|length > 0 -%} | |
{% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %} | |
<ul class="list-unstyled"> | |
{%- for error in errors -%} | |
<li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message }}</li> | |
{%- endfor -%} | |
</ul> | |
{% if form is not rootform %}</span>{% else %}</div>{% endif %} | |
{%- endif %} | |
{%- endblock form_errors %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment