mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #7833 -- Improved UserCreationForm password validation
Make UserCreationForm password validation similar to SetPasswordForm and AdminPasswordChangeForm, so as the match check is only done when both passwords are supplied. Thanks Mitar for the suggestion.
This commit is contained in:
@@ -65,6 +65,7 @@ class UserCreationFormTest(TestCase):
|
||||
form = UserCreationForm(data)
|
||||
self.assertFalse(form.is_valid())
|
||||
self.assertEqual(form['password1'].errors, required_error)
|
||||
self.assertEqual(form['password2'].errors, [])
|
||||
|
||||
def test_success(self):
|
||||
# The success case.
|
||||
|
||||
Reference in New Issue
Block a user