update: settings.py set phone number regular grammar

This commit is contained in:
JackSun-qc 2022-03-07 09:37:04 +08:00
parent b21b169029
commit 543010e52f

View File

@ -166,7 +166,7 @@ def set(opt, val):
if not isinstance(val, str): if not isinstance(val, str):
return False return False
# TODO: This ure not work in EC600N # TODO: This ure not work in EC600N
pattern = ure.compile(r'^(?:(?:\+)86)?1[3-9]\d{9}$') pattern = ure.compile(r'^(?:(?:\+)86)?1[3-9]\d\d\d\d\d\d\d\d\d$')
if pattern.search(val): if pattern.search(val):
current_settings['app'][opt] = val current_settings['app'][opt] = val
return True return True