from __future__ import annotations import re def is_valid_device_uid(uid: str) -> bool: return bool(re.match(r"^[a-zA-Z0-9_-]{3,100}$", uid)) def is_valid_email(email: str) -> bool: return bool(re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email))