From a048adcdacb3cd294467f3c7e04f187a8617534d Mon Sep 17 00:00:00 2001 From: pjrharley Date: Sat, 30 May 2009 16:17:19 +0100 Subject: [svn] A few registration updates -display an error for nonmatching passwords -display an error for short passwords -dont direct people to http://http://sitename.... --- registration/forms.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'registration/forms.py') diff --git a/registration/forms.py b/registration/forms.py index f2298ac..2f591d4 100644 --- a/registration/forms.py +++ b/registration/forms.py @@ -65,6 +65,8 @@ class RegistrationForm(forms.Form): if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data: if self.cleaned_data['password1'] != self.cleaned_data['password2']: raise forms.ValidationError(_(u'You must type the same password each time')) + if len(self.cleaned_data['password1']) < 6: + raise forms.ValidationError(_(u'Your password must be at least 6 characters')) return self.cleaned_data def save(self): -- cgit v1.2.3