mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 13:20:01 +00:00
Update forms.py
This commit is contained in:
parent
a0f6f93a80
commit
1f63cdea0a
|
@ -72,23 +72,23 @@ class RegisterForm(FlaskForm):
|
|||
|
||||
|
||||
class ProfileForm(FlaskForm):
|
||||
email = TextField('New email address', [
|
||||
email = TextField('New Email Address', [
|
||||
Email(),
|
||||
Optional(),
|
||||
Length(min=5, max=128),
|
||||
Unique(User, User.email, 'Email is taken')
|
||||
Unique(User, User.email, 'This email address has been taken')
|
||||
])
|
||||
|
||||
current_password = PasswordField('Current password', [Required()])
|
||||
current_password = PasswordField('Current Password', [Required()])
|
||||
|
||||
new_password = PasswordField('New password (confirm)', [
|
||||
new_password = PasswordField('New Password', [
|
||||
Optional(),
|
||||
EqualTo('password_confirm', message='Passwords must match'),
|
||||
EqualTo('password_confirm', message='Two passwords must match'),
|
||||
Length(min=6, max=1024,
|
||||
message='Password must be at least %(min)d characters long.')
|
||||
])
|
||||
|
||||
password_confirm = PasswordField('Repeat Password')
|
||||
password_confirm = PasswordField('Repeat New Password')
|
||||
|
||||
|
||||
# Classes for a SelectField that can be set to disable options (id, name, disabled)
|
||||
|
|
Loading…
Reference in a new issue