update
This commit is contained in:
parent
b08d6a02aa
commit
4b68d8ea33
@ -26,8 +26,9 @@ async def registerUser(ns):
|
||||
ns['username'] = ns['mobile']
|
||||
|
||||
if ns.get('password'):
|
||||
if len(ns.get('password')) < 6:
|
||||
return {'status': False, 'msg': '密码必须6位数以上'}
|
||||
# 至少8位,包含大小写字母、特殊字符、数字
|
||||
if len(ns.get('password')) < 8 or not re.search(r'[a-zA-Z]', ns.get('password')) or not re.search(r'[0-9]', ns.get('password')) or not re.search(r'[!@#$%^&*()_+{}|:"<>?]', ns.get('password')):
|
||||
return {'status': False, 'msg': '密码至少8位,包含大小写字母、特殊字符、数字'}
|
||||
|
||||
if not ns.get('codeid'):
|
||||
return {'status': False, 'msg': '验证码ID不能为空'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user