mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-14 12:02:46 +02:00
* #3260 allow selected special chars password check * #179 add identity_uri * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
17 lines
384 B
Python
17 lines
384 B
Python
import re
|
|
|
|
|
|
def password_valid(password: str):
|
|
if len(password) < 8:
|
|
return False
|
|
if password.find(" ") >= 0:
|
|
return False
|
|
return re.match("^[\.a-zA-Z0-9-_]*$", password)
|
|
|
|
|
|
def name_valid(password: str):
|
|
if len(password) < 3:
|
|
return False
|
|
if password.find(" ") >= 0:
|
|
return False
|
|
return re.match("^[\.a-zA-Z0-9-_]*$", password)
|