first chapter

This commit is contained in:
marys
2025-08-21 14:56:07 +02:00
parent 8502d81972
commit e8b18d2ff0

View File

@@ -61,5 +61,5 @@ class UserMaxLength(BaseModel):
if value < 0: if value < 0:
raise ValidationError("age must be positive") raise ValidationError("age must be positive")
if value < 18: if value < 18:
raise ValueError("You are too young to register") raise ValidationError("You are too young to register")
return value return value