diff --git a/apps/common/forms.py b/apps/common/forms.py index 4f4eefc23..87b2f4f12 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -182,6 +182,7 @@ class SecuritySettingForm(BaseForm): # 最小长度 SECURITY_PASSWORD_MIN_LENGTH = forms.IntegerField( initial=6, label=_("Password minimum length"), + min_value=6 ) # 大写字母 SECURITY_PASSWORD_UPPER_CASE = forms.BooleanField( diff --git a/apps/common/templates/common/security_setting.html b/apps/common/templates/common/security_setting.html index d2c436304..e84f5bc72 100644 --- a/apps/common/templates/common/security_setting.html +++ b/apps/common/templates/common/security_setting.html @@ -12,7 +12,7 @@