Created
April 11, 2018 00:05
-
-
Save cantoniazzi/298643fb804a9639164e150a79d1e10c to your computer and use it in GitHub Desktop.
A gist that displays in the template a form of global iteration of form validation errors in a flask application.
This file contains hidden or 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
{% if form.errors %} | |
{% for field in form.errors %} | |
{% for error in form.errors[field] %} | |
<div class="alert alert-danger"> | |
<small class="text-danger"> | |
<strong>Error:</strong> {{ error }} | |
</small> | |
</div> | |
{% endfor %} | |
{% endfor %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment