Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.py
More file actions
Latest commit
33 lines (26 loc) · 896 Bytes
/
Copy pathforms.py
File metadata and controls
33 lines (26 loc) · 896 Bytes
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
fromflask_wtfimportForm
fromwtformsimportTextField, PasswordField
fromwtforms.validatorsimportDataRequired, EqualTo, Length
# Set your classes here.
classRegisterForm(Form):
name=TextField(
'Username', validators=[DataRequired(), Length(min=6, max=25)]
)
email=TextField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)
password=PasswordField(
'Password', validators=[DataRequired(), Length(min=6, max=40)]
)
confirm=PasswordField(
'Repeat Password',
[DataRequired(),
EqualTo('password', message='Passwords must match')]
)
classLoginForm(Form):
name=TextField('Username', [DataRequired()])
password=PasswordField('Password', [DataRequired()])
classForgotForm(Form):
email=TextField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)