Minor modifications
This commit is contained in:
parent
185ca3f354
commit
f0ef827577
|
@ -71,7 +71,7 @@ VALIDATE_USERNAME_REGEX = (
|
||||||
# - At least 2 numbers
|
# - At least 2 numbers
|
||||||
# You can change the repetitions to enforce stricter/laxer rules or empty
|
# You can change the repetitions to enforce stricter/laxer rules or empty
|
||||||
# this field to disable weakness validation
|
# this field to disable weakness validation
|
||||||
VALIDATE_PASSWORD_REGEX = r"^(?=.*[A-Z]){2,}(?=.*[!@%#$&*_^\?\\\/(\)\+\-])+(?=.*[0-9]){2,}(?=.*[a-z]){3,}.{10,72}$"
|
VALIDATE_PASSWORD_REGEX = r"^(?=.*[A-Z]){2,}(?=.*[\"!@%#$&*_^\?\\\/(\)\+\-])+(?=.*[0-9]){2,}(?=.*[a-z]){3,}.{10,72}$"
|
||||||
FORCE_EMAIL_VERIFICATION = False
|
FORCE_EMAIL_VERIFICATION = False
|
||||||
EMAIL_VERIFICATION_EXPIRATION = 3600 # In seconds
|
EMAIL_VERIFICATION_EXPIRATION = 3600 # In seconds
|
||||||
PLATFORM_NAME = "PySimpleSocial" # Used in emails
|
PLATFORM_NAME = "PySimpleSocial" # Used in emails
|
||||||
|
|
|
@ -296,10 +296,10 @@ async def get_user_by_public_id(
|
||||||
|
|
||||||
|
|
||||||
async def validate_user(
|
async def validate_user(
|
||||||
first_name: str,
|
first_name: str | None,
|
||||||
last_name: str,
|
last_name: str | None,
|
||||||
username: str,
|
username: str | None,
|
||||||
email: str,
|
email: str | None,
|
||||||
password: str | None,
|
password: str | None,
|
||||||
bio: str | None,
|
bio: str | None,
|
||||||
) -> tuple[bool, str]:
|
) -> tuple[bool, str]:
|
||||||
|
|
Loading…
Reference in New Issue