#36140: UserCreationForm doesn't allow empty password even if password fields
are
specified as "not required"
-------------------------------------+-------------------------------------
Reporter: buffgecko12 | Owner: (none)
Type: Bug | Status: new
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: form | Triage Stage: Accepted
usercreationform validation |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Gregory Mariani):
test in test_forms.UserCreationFormTest could be something like that:
{{{
def test_empty_passwords_with_required_false(self):
form_data = {
"username": "testuser",
# 'password1' et 'password2' are not given
}
form = self.form_class(data=form_data)
self.assertFalse(form.is_valid())
self.assertNotIn("password1", form.errors)
self.assertNotIn("password2", form.errors)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36140#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194b1de15ca-02fc3af2-62be-4f07-b738-9c005e1238f5-000000%40eu-central-1.amazonses.com.