9 lines
216 B
Python
9 lines
216 B
Python
|
from pydantic import BaseModel, EmailStr
|
||
|
from typing import Annotated
|
||
|
from annotated_types import MinLen, MaxLen
|
||
|
|
||
|
|
||
|
class CreateUser(BaseModel):
|
||
|
username: Annotated[str, MinLen(3), MaxLen(40)]
|
||
|
email: EmailStr
|