{% load i18n %}

{{ form.non_field_errors }}

<form action="{{ form_action }}" 
    method="post" 
    enctype="multipart/form-data" 
    novalidate>
    {% csrf_token %}

    {% for field in form %}
        <label 
            class="{% if field.errors %} validate-error {% endif %}" 
            for="{{ field.name }}">
            {{ field.label_tag }}
        </label>

        {{ field }}

        {% if field.errors %}
            <p class="error-border validate-error">
            {% for error in field.errors %}
                {{ error }}
            {% endfor %}
            </p>
       {% endif %}

    {% endfor %}

    <button type="submit">{% trans 'Valider' %}</button>
</form>
