this closed #4
This commit is contained in:
parent
8e3fc062ff
commit
1ba9082a19
1 changed files with 10 additions and 1 deletions
|
|
@ -92,6 +92,11 @@ class PasswordForm(forms.Form):
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_('The new passwords were not identical.'),
|
_('The new passwords were not identical.'),
|
||||||
code='not_identical')
|
code='not_identical')
|
||||||
|
if len(password1) < 6:
|
||||||
|
raise forms.ValidationError(
|
||||||
|
_('Password must be at least 6 characters long'),
|
||||||
|
code='to_short')
|
||||||
|
|
||||||
return cleaned_data
|
return cleaned_data
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -152,6 +157,10 @@ class AdminForm(forms.Form):
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_('The new passwords were not identical.'),
|
_('The new passwords were not identical.'),
|
||||||
code='not_identical')
|
code='not_identical')
|
||||||
|
if len(password1) < 6:
|
||||||
|
raise forms.ValidationError(
|
||||||
|
_('Password must be at least 6 characters long'),
|
||||||
|
code='to_short')
|
||||||
|
|
||||||
return cleaned_data
|
return cleaned_data
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue