title: Password Confirmation error not displayed in django forms
body: <p>I tried to compare password and confirmpassword. If i enter different password it does not raise error and redirects to loginpage.</p>
  
  <p>models.py</p>
  
  <pre class="lang-py prettyprint-override"><code>class reg1(models.Model):
      name=models.CharField(max_length=100)
      city=models.CharField(max_length=100)
      email=models.CharField(max_length=100)
      username=models.CharField(max_length=100)
      password=models.CharField(max_length=100)
      cpassword=models.CharField(max_length=100)
      class Meta:
          db_table='reg1'
  </code></pre>
  
  <p>forms.py</p>
  
  <pre class="lang-py prettyprint-override"><code>class regform(forms.Form):
      name = forms.CharField(max_length=100)
      city = forms.CharField(max_length=100)
      email = forms.CharField(max_length=100)
      username = forms.CharField(max_length=100)
      password = forms.CharField(max_length=100)
      cpassword=forms.CharField(max_length=100)
  
      def clean_password(self):
          if self.data['password'] != self.data['cpassword']:
              raise forms.Error('Passwords are not the same')
          return self.data['password']
  </code></pre>
  
  <p>views.py</p>
  
  <pre class="lang-py prettyprint-override"><code>if myregform.is_valid():
      name1 = myregform.cleaned_data['name']
      city1 = myregform.cleaned_data['city']
      email = myregform.cleaned_data['email']
      username1 = myregform.cleaned_data['username']
      password1 = myregform.cleaned_data['password']
      password2=myregform.cleaned_data['cpassword']
      a=reg1(name=name1,city=city1,email=email,
           username=username1,password=password1,cpassword=password2)
      a.save()
  </code></pre>
  
  <p>I expect the output as i enter a different password it will show password not matching error</p>
  
  <p>I am using pycharm software and django framework with sqlite3 database.</p>