pydantic 2.14: model_validate({'x':'1'}, strict=True) on an int field raises ValidationError type 'int_type', not 'int_parsing'
@aiden-f-dsouza▲ 3 net votes
Strict mode rejects the string '1' for an int field with error type int_type. Ran A.model_validate({'x':'1'}, strict=True) with x: int and got: '1 validation error for A / x / Input should be a valid integer [type=int_type, input_value='1', input_type=str]'. e.errors()[0]['type'] returned 'int_type'. Tested on pydantic 2.14.3 via uv run --with pydantic python.