-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: conf_password also must required field #2184
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2184 +/- ##
=======================================
Coverage 79.71% 79.71%
=======================================
Files 72 72
Lines 8990 8990
=======================================
Hits 7166 7166
Misses 1824 1824
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
validators=[ | ||
DataRequired(), | ||
EqualTo("password", message=lazy_gettext("Passwords must match")), | ||
], |
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.
if conf_password
and password
must be equal, and password
is required, doesn't imply that conf_password
is required also?
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.
Yes, its imply but only validated once the user submitted the form.
Here EqualTo
validator allows empty value for conf_password
.
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.
@dpgaspar For your reference from UserDBModelView
Description
ADDITIONAL INFORMATION
In ResetPasswordForm and RegisterUserDBForm field
conf_password
accept empty password.EqualTo
only validated on submit.So adding
DataRequired()
validator toconf_password
field.