Spaces:
Sleeping
Sleeping
| # utils/validators.py | |
| import re | |
| EMAIL_RE = re.compile(r"^[\w\.-]+@[\w\.-]+\.\w+$") | |
| PWD_RE = re.compile(r"^(?=.*[0-9])(?=.*[!@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?]).{8,}$") | |
| def valid_email(email: str) -> bool: | |
| return EMAIL_RE.match(email) is not None | |
| def valid_password(password: str) -> bool: | |
| return PWD_RE.match(password) is not None | |