from pydantic import BaseModel
class User(BaseModel):
age: int = Field('foo', ge=0)
User() # doesn't raise an error
# User(age='foo')
Why doesn't this raise an error since a string foo is passed even though an int is expected?
User(age='foo') however raises the ValidationError as expected.