Split backend into multiple files

This commit is contained in:
2025-08-17 19:27:47 +03:00
Unverified
parent 1156345feb
commit cc819257a3
7 changed files with 187 additions and 167 deletions
+16
View File
@@ -0,0 +1,16 @@
import re
def is_valid_username(username: str) -> bool:
if len(username) < 3 or len(username) > 20:
return False
if re.search(r'[\s\u180E\u200B-\u200D\u2060\uFEFF]', username):
return False
return True
def is_valid_password(password: str) -> bool:
if len(password) < 5 or len(password) > 50:
return False
if re.search(r'[\s\u180E\u200B-\u200D\u2060\uFEFF]', password):
return False
return True