From 98fcfe1e7d4638593ed1aac2397e1e14a96862e6 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Mon, 8 Jul 2019 11:08:24 +0200 Subject: [PATCH] Add registrationForm --- app/auth/forms.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/auth/forms.py b/app/auth/forms.py index d50cf956..77b25333 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -1,6 +1,8 @@ from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField -from wtforms.validators import DataRequired, Length, Email +from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo +from wtforms import ValidationError +from ..models import User class LoginForm(FlaskForm): @@ -9,3 +11,7 @@ class LoginForm(FlaskForm): password = PasswordField('Password', validators=[DataRequired()]) remember_me = BooleanField('Keep me logged in') submit = SubmitField('Log In') + + +class RegistrationForm(FlaskForm): + email = StringField('Email', validators=[DataRequired(), Length(1, 64), Email()])