title: How to override password_change error messages in django?
body: <p>I have spent ages on the net how to override the change_password form in django. I created my forms and I can change my passwords successfully. Now I want to display my errors on the page.
  (By the way , I'm using django-registration.)</p>
  
  <p>The problem is I have to change error messages. In my template I'm using this function to display new_password1 errors :</p>
  
  <pre><code>{% if form.new_password1.errors %}
       &lt;div class="error_message"&gt; blah &lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>However it consists of  all new_password1 errrors. I looked the docs and found that CharField has only reqiured, max and min. I need to check each specific errors of the new_password1 (confirmation error, required error and min,max) and produce my own error messages. Since the CharField doesn't have a matching keyword, I tried a clean method in my forms.py which looks like :</p>
  
  <pre><code> def clean_password2(self):                                                                                                                                                                                                                               
          if  'new_password1' in self.cleaned_data and 'new_password2' in self.cleaned_data:                                                                                                                                                                   
              if self.cleaned_data['new_password1'] != self.cleaned_data['new_password2']:                                                                                                                                                                     
                  raise forms.ValidationError(_(u"no match"))                                                                                                                                                                                                
  
          return cleaned_data   
  </code></pre>
  
  <p>Finally, I don't know how to check this clean_password2 validation in my template. When I wrote registration page, I can display all my errors by looping the errors. And it displays all overrided errors. This time it doesn't work. So my quesstions are:</p>
  
  <p>1- How can i check all specific errors in my templates ? like if form.new_password1.required.errors</p>
  
  <p>2- How can i display this clean_password2 messages ? </p>