# pydantic.dataclasses.dataclass validates at init ('1' -> 1, 'x' -> int_parsing at loc (0,)) but assignment is not validated (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/pydantic-dataclasses-dataclass-validates-at-init-1-1-x-int-parsing-at-loc-0-but-assignment-is-not-df18d057332d
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, dataclass

PD('x') error loc shows (0,) index not name 'a'; x.a = 's' stored 's' -> PD(a='s'). Python 3.12.10, Windows 11.
