-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
19 lines (16 loc) · 889 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import InputRequired, Email
from wtforms.fields.html5 import EmailField
class UserForm(FlaskForm):
username = StringField('Username', validators=[InputRequired()])
password = PasswordField('Password', validators=[InputRequired()])
email = EmailField('Email', validators=[InputRequired(), Email()])
first_name = StringField('First Name', validators=[InputRequired()])
last_name = StringField('Last Name', validators=[InputRequired()])
class LoginForm(FlaskForm):
username = StringField('Username', validators=[InputRequired()])
password = PasswordField('Password', validators=[InputRequired()])
class FeedbackForm(FlaskForm):
title = StringField('Title', validators=[InputRequired()])
content = StringField('Feedback', validators=[InputRequired()])