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
commita048adcdacb3cd294467f3c7e04f187a8617534d (patch)
treedaf2f5bdb6ae511d9014dd32d0cb9df68ae2cf43 /registration/forms.py
parentb091e8eb09fe9c1f3949d5727acc79146e3cdf10 (diff)
downloadtroggle-a048adcdacb3cd294467f3c7e04f187a8617534d.tar.gz
troggle-a048adcdacb3cd294467f3c7e04f187a8617534d.tar.bz2
troggle-a048adcdacb3cd294467f3c7e04f187a8617534d.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):