-
Notifications
You must be signed in to change notification settings - Fork 47
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
Email form type changed to email #43
Conversation
mod_auth/forms.py
Outdated
@@ -42,13 +42,13 @@ class LoginForm(Form): | |||
email = StringField('Email', [DataRequired( | |||
message='Email is not filled in.')]) | |||
password = PasswordField('Password', [ | |||
DataRequired(message='Password cannot be empty.')]) | |||
DataRequired(message='Password cannot be empty.'), Email("entered value is not a valid email address")]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably meant to add it on #L43.
Also, please change it from entered
to Entered
while you are at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes !!
Thanks
mod_auth/forms.py
Outdated
submit = SubmitField('Login') | ||
|
||
|
||
class SignupForm(Form): | ||
email = StringField('Email', [DataRequired( | ||
message='Email is not filled in.')]) | ||
message='Email is not filled in.'), Email("entered value is not a valid email address")]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same change as above.
Fixes are just adding extra validation (which isn't bad on itself), but do not change the type to email, as requested in the issue. |
then should i only have to validate for login? |
@satyammittal I think you misunderstood the requirement. Currently, the input type in the generated HTML form is of type text. You simply have to change it to email wherever required. Also, by extra @canihavesomecoffee did not mean that you added the validation for more than 1 fields. :P Extra as in, apart from the one being done already. It has already been done in the same file you're working. Just look at it. It's just a matter of changing from |
#35
fixed-"Input type of login email field should be email instead of text"