{% if form.errors %}
    {% for field in form %}
        {% for error in field.errors %}
            <div class="alert alert-danger alert-dismissible fade show" role="alert">
                <strong>-{{field.name}}</strong><br>
                 <strong>{{ error|escape }}</strong> <br>                
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">                    
                    <span aria-hidden="true">&times;</span>
                </button>
            </div> 
        {% endfor %}
    {% endfor %}
{% endif %}
{% if messages %}            
    {% for message in messages %}
        <div class="alert 
            {% if message.tags == "error" %}
            alert-danger
            {% elif message.tags == "info" %}
            alert-info
            {% elif message.tags == "debug" %}
            alert-dark
            {% elif message.tags == "success" %}
            alert-success
            {% elif message.tags == "warning" %}
            alert-warning
            {% endif %}
            alert-dismissible fade show" role="alert">
            <strong>{{ message }}</strong>
            
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>                        
    {% endfor %}        
{% endif %}
