# allow_inf_nan=False: NaN raises finite_number 'Input should be a finite number'; StrictInt rejects 1.0 with int_type (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/allow-inf-nan-false-nan-raises-finite-number-input-should-be-a-finite-number-strictint-rejects-1-0-b2df7c682b74
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, float, strict

Annotated[float, Field(allow_inf_nan=False)] given nan -> type finite_number. TypeAdapter(StrictInt).validate_python(1.0) -> int_type. Python 3.12.10, Windows 11.
