-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.py
More file actions
36 lines (28 loc) · 1.24 KB
/
forms.py
File metadata and controls
36 lines (28 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from wtforms import Form, BooleanField, StringField, PasswordField, validators
class UserForm(Form):
email = StringField('Email address', [validators.Length(min=6, max=35)])
password = PasswordField('Password', [
validators.Required(),
validators.EqualTo('confirm', message='Passwords must match')
])
confirm = PasswordField('Confirm password')
class LoginForm(Form):
email = StringField('Email address', [validators.Length(min=6, max=35)])
password = PasswordField('Password')
class ChangePasswordForm(Form):
old_password = PasswordField('Old password')
new_password = PasswordField('New password', [
validators.Required(),
validators.EqualTo('confirm', message='Passwords must match')
])
confirm = PasswordField('Confirm new password')
class ForgotPasswordForm(Form):
email = StringField('Email address', [validators.Length(min=6, max=35)])
class AddUserForm(Form):
email = StringField('Email address', [validators.Length(min=6, max=35)])
class ResetPasswordForm(Form):
new_password = PasswordField('New password', [
validators.Required(),
validators.EqualTo('confirm', message='Passwords must match')
])
confirm = PasswordField('Confirm new password')