-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathforms.py
17 lines (15 loc) · 910 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo
class Register(FlaskForm):
FullName = StringField('Full Name', validators=[DataRequired()])
EMAIL = StringField('E-Mail', validators=[DataRequired(), Email()])
Username = StringField('Username', validators=[DataRequired(), Length(min=6)])
Password = PasswordField('Password', validators=[DataRequired(), Length(min=8, max=63)])
ConfirmPassword = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('Password')])
SignUp = SubmitField('Sign Up')
class LogIn(FlaskForm):
Username = StringField('Username', validators=[DataRequired(), Length(min=6)])
Password = PasswordField('Password', validators=[DataRequired(), Length(min=8, max=63)])
RememberMe = BooleanField('Remember Me')
login = SubmitField('Log In')