aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/auth/forms.py')
-rw-r--r--mediagoblin/auth/forms.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/mediagoblin/auth/forms.py b/mediagoblin/auth/forms.py
index a932ad26..4cd3e9d8 100644
--- a/mediagoblin/auth/forms.py
+++ b/mediagoblin/auth/forms.py
@@ -29,15 +29,7 @@ class RegistrationForm(wtforms.Form):
password = wtforms.PasswordField(
_('Password'),
[wtforms.validators.Required(),
- wtforms.validators.Length(min=6, max=30),
- wtforms.validators.EqualTo(
- 'confirm_password',
- _('Passwords must match.'))])
- confirm_password = wtforms.PasswordField(
- _('Confirm password'),
- [wtforms.validators.Required()],
- description=_(
- u"Type it again here to make sure there are no spelling mistakes."))
+ wtforms.validators.Length(min=6, max=30)])
email = wtforms.TextField(
_('Email address'),
[wtforms.validators.Required(),
@@ -59,9 +51,10 @@ class ForgotPassForm(wtforms.Form):
'Username or email',
[wtforms.validators.Required()])
- def validate_username(form,field):
- if not (re.match(r'^\w+$',field.data) or
- re.match(r'^.+@[^.].*\.[a-z]{2,10}$',field.data, re.IGNORECASE)):
+ def validate_username(form, field):
+ if not (re.match(r'^\w+$', field.data) or
+ re.match(r'^.+@[^.].*\.[a-z]{2,10}$', field.data,
+ re.IGNORECASE)):
raise wtforms.ValidationError(u'Incorrect input')
@@ -82,4 +75,3 @@ class ChangePassForm(wtforms.Form):
token = wtforms.HiddenField(
'',
[wtforms.validators.Required()])
-