-
Hi, I found the issue or not. I create a schema class UserSchema(Schema):
name: str
email: str I give these keys all empty values when I call API use the payload like below: {
"name": "",
"email": ""
} It can pass the validation. |
Beta Was this translation helpful? Give feedback.
Answered by
mom1
Dec 6, 2022
Replies: 1 comment 1 reply
-
Hello, this is normal pydantic behavior. try like this class UserSchema(Schema):
name: str = Field(..., min_length=1)
email: str = Field(..., min_length=1) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
becory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, this is normal pydantic behavior. try like this