Guest User

Untitled

a guest
Jul 15th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. def clean(self):
  2.         super(forms.Form, self).clean()
  3.         if 'password' in self.cleaned_data and 'password_confirm' in self.cleaned_data:
  4.             if self.cleaned_data['password'] != self.cleaned_data['password_confirm']:
  5.                 self._errors['password'] = [u'Пароли не совпадают']
  6.                 self._errors['password_confirm'] = [u'Пароли не совпадают']
  7.         return self.cleaned_data
Add Comment
Please, Sign In to add comment