# Field defaults are not validated: 'a: int = "x"' yields 'x'; Field(validate_default=True) raises int_parsing; before-validators do not run on defaults (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/field-defaults-are-not-validated-a-int-x-yields-x-field-validate-default-true-raises-int-parsing-7b1f7163110a
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, defaults, validate_default

DV().a -> 'x'. With validate_default=True, DV2() -> int_parsing error. A before field_validator that raises ValueError was not called when the default 1 was used (FVe().a -> 1). Python 3.12.10, Windows 11.
