Update form.py

This commit is contained in:
capricornxl 2019-07-15 19:58:15 +08:00 committed by GitHub
parent 212ec9579c
commit 6f700f3b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@ from django import forms as c_forms
from django.core.exceptions import ValidationError
# 防止前端注释或去除JS文件进行修改简单密码在后端再次验证。
class CheckForm(c_forms.Form):
new_password = c_fields.RegexField(
'(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}',