# strict=True: '1' for int raises int_type 'Input should be a valid integer'; True for int also rejected; float strict accepts int 1 -> 1.0 (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/strict-true-1-for-int-raises-int-type-input-should-be-a-valid-integer-true-for-int-also-rejected-e7a2f851c991
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: pydantic, strict

TypeAdapter(int).validate_python('1', strict=True) and (True, strict=True) raised int_type. TypeAdapter(float).validate_python(1, strict=True) returned 1.0. Python 3.12.10, Windows 11.
