Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Forms.py on WTF 3 and Email Standards #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions forms.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms.validators import DataRequired, EqualTo, Length
from wtforms import TextField, PasswordField, StringField
from wtforms.validators import DataRequired, EqualTo, Length,email

# Set your classes here.


class RegisterForm(Form):
name = TextField(
'Username', validators=[DataRequired(), Length(min=6, max=25)]
name = StringField(
'Username', validators=[DataRequired(), Length(min=6)]
)
email = TextField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=254)]
)
password = PasswordField(
'Password', validators=[DataRequired(), Length(min=6, max=40)]
'Password', validators=[DataRequired(), Length(min=8, max=100)]
)
confirm = PasswordField(
'Repeat Password',
Expand All @@ -23,11 +23,11 @@ class RegisterForm(Form):


class LoginForm(Form):
name = TextField('Username', [DataRequired()])
email = StringField('Email', [DataRequired(),Length(min=6, max=254),email])
password = PasswordField('Password', [DataRequired()])


class ForgotForm(Form):
email = TextField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=254)]
)