Add explanation to enums usage as a pydantic field
This commit is contained in:
@@ -89,7 +89,7 @@ class UserBase(BaseModel):
|
||||
username: constr(regex="^[A-Za-z0-9-_]+$", to_lower=True, strip_whitespace=True)
|
||||
email: EmailStr
|
||||
age: int = Field(ge=18, default=None) # must be greater or equal to 18
|
||||
favorite_band: MusicBand = None
|
||||
favorite_band: MusicBand = None. # only "AEROSMITH", "QUEEN", "AC/DC" values are allowed to be inputted
|
||||
website: AnyUrl = None
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user