diff --git a/forms/login.py b/forms/login.py index 0b272b5..14ba8a0 100644 --- a/forms/login.py +++ b/forms/login.py @@ -1,5 +1,5 @@ from wtforms import Form, BooleanField, StringField, PasswordField, TextAreaField, validators -from wtforms.fields.html5 import DateField, DecimalField, IntegerField +from wtforms.fields.html5 import DateField, DecimalField, IntegerField, EmailField from wtforms.widgets import TextArea from flask_login import UserMixin from flask_babel import gettext as _ @@ -35,7 +35,7 @@ class ServiceForm(Form): website = StringField(_("Website"), render_kw = FORM_RENDER_KW) class LoginForm(Form): - email = StringField(_("Email"), [ + email = EmailField(_("Email"), [ validators.DataRequired(), validators.Length(min=6, max=254) ], @@ -48,7 +48,7 @@ class LoginForm(Form): render_kw = FORM_RENDER_KW) class RegisterForm(Form): - email = StringField(_("Email"), [ + email = EmailField(_("Email"), [ validators.DataRequired(), validators.Length(min=6, max=254) ],