From bcafe94e7167e8a4d78fa9d574f5cbe5b7c89d29 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 15 Aug 2024 09:47:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20base=20validate=5Fpassword=E6=94=AF?= =?UTF-8?q?=E6=8C=81.=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/auth1/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/auth1/services.py b/apps/auth1/services.py index d7441e31..29eb6e9f 100644 --- a/apps/auth1/services.py +++ b/apps/auth1/services.py @@ -15,7 +15,7 @@ def check_phone_code(phone, code, raise_exception=True): def validate_password(password): # 正则表达式匹配规则 - pattern = r"^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?!.*\s).{8,}$" + pattern = r"^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@#$%^&.+=!])(?!.*\s).{8,}$" # 使用正则表达式进行匹配 if re.match(pattern, password):