"Separate tags by commas."))
slug = wtforms.TextField(
_('Slug'),
- [wtforms.validators.Required(message=_("The slug can't be empty"))],
+ [wtforms.validators.InputRequired(message=_("The slug can't be empty"))],
description=_(
"The title part of this media's address. "
"You usually don't need to change this."))
class EditCollectionForm(wtforms.Form):
title = wtforms.TextField(
_('Title'),
- [wtforms.validators.Length(min=0, max=500), wtforms.validators.Required(message=_("The title can't be empty"))])
+ [wtforms.validators.Length(min=0, max=500), wtforms.validators.InputRequired(message=_("The title can't be empty"))])
description = wtforms.TextAreaField(
_('Description of this collection'),
description=_("""You can use
Markdown</a> for formatting."""))
slug = wtforms.TextField(
_('Slug'),
- [wtforms.validators.Required(message=_("The slug can't be empty"))],
+ [wtforms.validators.InputRequired(message=_("The slug can't be empty"))],
description=_(
"The title part of this collection's address. "
"You usually don't need to change this."))
class ChangePassForm(wtforms.Form):
old_password = wtforms.PasswordField(
_('Old password'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(
"Enter your old password to prove you own this account."))
new_password = wtforms.PasswordField(
_('New password'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
wtforms.validators.Length(min=6, max=30)],
id="password")
class ChangeEmailForm(wtforms.Form):
new_email = wtforms.TextField(
_('New email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
password = wtforms.PasswordField(
_('Password'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(
"Enter your password to prove you own this account."))
is included in the POST."""
csrf_token = HiddenField("",
- [validators.Required()])
+ [validators.InputRequired()])
def render_csrf_form_token(request):
class RegistrationForm(wtforms.Form):
username = wtforms.TextField(
_('Username'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_email=False)])
password = wtforms.PasswordField(
_('Password'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
wtforms.validators.Length(min=5, max=1024)])
email = wtforms.TextField(
_('Email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
class LoginForm(wtforms.Form):
username = wtforms.TextField(
_('Username or Email'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field()])
password = wtforms.PasswordField(
_('Password'))
class ForgotPassForm(wtforms.Form):
username = wtforms.TextField(
_('Username or email'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field()])
class ChangeForgotPassForm(wtforms.Form):
password = wtforms.PasswordField(
'Password',
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
wtforms.validators.Length(min=5, max=1024)])
token = wtforms.HiddenField(
'',
- [wtforms.validators.Required()])
+ [wtforms.validators.InputRequired()])
class ChangePassForm(wtforms.Form):
old_password = wtforms.PasswordField(
_('Old password'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(
"Enter your old password to prove you own this account."))
new_password = wtforms.PasswordField(
_('New password'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
wtforms.validators.Length(min=6, max=30)],
id="password")
class RegisterForm(wtforms.Form):
username = wtforms.HiddenField(
'',
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_email=False)])
email = wtforms.TextField(
_('Email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
class LoginForm(wtforms.Form):
username = wtforms.TextField(
_('Username'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field()])
password = wtforms.PasswordField(
_('Password'),
- [wtforms.validators.Required()])
+ [wtforms.validators.InputRequired()])
class AuthorizationForm(wtforms.Form):
client_id = wtforms.HiddenField(u'',
- validators=[wtforms.validators.Required()])
- next = wtforms.HiddenField(u'', validators=[wtforms.validators.Required()])
+ validators=[wtforms.validators.InputRequired()])
+ next = wtforms.HiddenField(u'', validators=[wtforms.validators.InputRequired()])
allow = wtforms.SubmitField(_(u'Allow'))
deny = wtforms.SubmitField(_(u'Deny'))
class ClientRegistrationForm(wtforms.Form):
- name = wtforms.TextField(_('Name'), [wtforms.validators.Required()],
+ name = wtforms.TextField(_('Name'), [wtforms.validators.InputRequired()],
description=_('The name of the OAuth client'))
description = wtforms.TextAreaField(_('Description'),
[wtforms.validators.Length(min=0, max=500)],
description=_('''This will be visible to users allowing your
application to authenticate as them.'''))
type = wtforms.SelectField(_('Type'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
choices=[
('confidential', 'Confidential'),
('public', 'Public')],
class RegistrationForm(wtforms.Form):
openid = wtforms.HiddenField(
'',
- [wtforms.validators.Required()])
+ [wtforms.validators.InputRequired()])
username = wtforms.TextField(
_('Username'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_email=False)])
email = wtforms.TextField(
_('Email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
class LoginForm(wtforms.Form):
openid = wtforms.TextField(
_('OpenID'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
# Can openid's only be urls?
wtforms.validators.URL(message='Please enter a valid url.')])
class RegistrationForm(wtforms.Form):
username = wtforms.TextField(
_('Username'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_email=False)])
email = wtforms.TextField(
_('Email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
persona_email = wtforms.HiddenField(
'',
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
class EditForm(wtforms.Form):
email = wtforms.TextField(
_('Email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
class AddForm(wtforms.Form):
original_sum = wtforms.TextField(None,
[_md5_validator,
- wtforms.validators.Required()])
+ wtforms.validators.InputRequired()])
thumbnail_sum = wtforms.TextField(None,
[wtforms.validators.Optional(),
_md5_validator])
class AddCollectionForm(wtforms.Form):
title = wtforms.TextField(
_('Title'),
- [wtforms.validators.Length(min=0, max=500), wtforms.validators.Required()])
+ [wtforms.validators.Length(min=0, max=500), wtforms.validators.InputRequired()])
description = wtforms.TextAreaField(
_('Description of this collection'),
description=_("""You can use
class MediaCommentForm(wtforms.Form):
comment_content = wtforms.TextAreaField(
_('Comment'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(u'You can use '
u'<a href="http://daringfireball.net/projects/markdown/basics" target="_blank">'
u'Markdown</a> for formatting.'))
class CommentReportForm(wtforms.Form):
report_reason = wtforms.TextAreaField(
_('Reason for Reporting'),
- [wtforms.validators.Required()])
+ [wtforms.validators.InputRequired()])
reporter_id = wtforms.HiddenField('')
class MediaReportForm(wtforms.Form):
report_reason = wtforms.TextAreaField(
_('Reason for Reporting'),
- [wtforms.validators.Required()])
+ [wtforms.validators.InputRequired()])
reporter_id = wtforms.HiddenField('')