pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.34k stars 207 forks source link

ValidationError missing reference to model being validated #1344

Open slahn opened 1 week ago

slahn commented 1 week ago

In pydantic 1.x, ValidationError has a model property which references the model being validated. We used this when deciding what error to show to the user.

It doesn't seem possible to get this information in 2.x. Would you consider adding it back?

(I'm guessing this issue belongs in core and not in pydantic. If it's in the wrong place, let me know)