class AccountForm(forms.Form):
....your stuff
def clean_password(self):
if self.data['password'] != self.data['password_confirm']:
raise forms.ValidationError('Passwords are not the same')
return self.data['password']