This commit is contained in:
2026-06-24 12:57:21 -04:00
parent cdfd01b053
commit 47d2d7bc67
7 changed files with 63 additions and 16 deletions

12
untitled/rules.py Normal file
View File

@@ -0,0 +1,12 @@
import string
def validate_cat_name(name):
ALLOWED = set(string.ascii_letters + string.digits)
if len(name) < 4 or len(name) > 24:
return "Your cat's name must be 4-24 characters long."
if not all(c in ALLOWED for c in name):
return "Letters and numbers only."
if not any(c in string.ascii_letters for c in name):
return "Your cat's name needs at least 1 letter."