Move factor base template to form_with_user

This commit is contained in:
Jens Langhammer
2019-02-23 20:41:43 +01:00
parent 5fa8711bfa
commit 66c0fc9d9a
4 changed files with 9 additions and 5 deletions

View File

@ -79,6 +79,10 @@ class SignUpForm(forms.Form):
def clean_password_repeat(self):
"""Check if Password adheres to filter and if passwords matche"""
password = self.cleaned_data.get('password')
password_repeat = self.cleaned_data.get('password_repeat')
if password != password_repeat:
raise ValidationError(_("Passwords don't match"))
# TODO: Password policy? Via Plugin? via Policy?
# return check_password(self)
return self.cleaned_data.get('password_repeat')