show form.errors django
{% extends 'app/base.html' %}
{% block content %}
<form method="POST" action="{% url 'app-add' %}">
{% csrf_token %}
<div class="form-group">
<label for="exampleInputName">Name</label>
<input type="text" class="form-control" name="name" aria-describedby="name" placeholder="Name">
</div>
{% if form.errors %}
{% for field in form %}
{% for error in field.errors %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
{% endfor %}
{% endif %}
<button type="submit" class="btn btn-primary">Submit</button>
</form>
{% endblock %}