diff options
author | pjrharley <devnull@localhost> | 2009-05-30 16:17:19 +0100 |
---|---|---|
committer | pjrharley <devnull@localhost> | 2009-05-30 16:17:19 +0100 |
commit | 096f74a3f35b53e2d479f6091c6acbc1000ae032 (patch) | |
tree | 629e9cb00ef3018d813acc05756925993ec02b4f /registration | |
parent | 4735edb9d08d8bb17ae00018d3bb087206afc09f (diff) | |
download | troggle-096f74a3f35b53e2d479f6091c6acbc1000ae032.tar.gz troggle-096f74a3f35b53e2d479f6091c6acbc1000ae032.tar.bz2 troggle-096f74a3f35b53e2d479f6091c6acbc1000ae032.zip |
[svn] A few registration updates
-display an error for nonmatching passwords
-display an error for short passwords
-dont direct people to http://http://sitename....
Diffstat (limited to 'registration')
-rw-r--r-- | registration/forms.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): |