title: Identify the nature of field error in django forms
body: <p>The 2 types of validation error a form field in django can have are 'required' and 'invalid'. Is there any way to find out which of these two errors has happened, from the template? Something like</p>
  
  <pre><code>{% if form.username.errors %}
  {% for error in form.username.errors %}
  {% if error.required %}
  Please enter the username
  {% else %}
  {{ error }}
  {% endif %}
  </code></pre>
  
  <p>I just want to override the error message for the 'required' error, i.e., I want to display my own error message if that error happens. I am using <code>django.contrib.auth.views</code> which uses <code>django.contrib.auth.forms.AuthenticationForm</code> which I don't want to try customizing.</p>