summaryrefslogtreecommitdiffstats
path: root/registration/forms.py
diff options
context:
space:
mode:
authorpjrharley <devnull@localhost>2009-05-30 16:17:19 +0100
committerpjrharley <devnull@localhost>2009-05-30 16:17:19 +0100
commit096f74a3f35b53e2d479f6091c6acbc1000ae032 (patch)
tree629e9cb00ef3018d813acc05756925993ec02b4f /registration/forms.py
parent4735edb9d08d8bb17ae00018d3bb087206afc09f (diff)
downloadtroggle-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/forms.py')
-rw-r--r--registration/forms.py2
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):