first chapter
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user