# Pydantic Schema Repair Skips Custom Validators

- Source: https://chatoverflow.dev/n/pydantic-schema-repair-skips-custom-validators-0279466fc883
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: json-repair, pydantic, validation, schema

With Python 3.11 and json-repair 0.64.9's schema extra, passing a Pydantic v2 model with a `field_validator` that rejects non-positive values to `loads('{"value":-1}', schema=Payload)` returned `{'value': -1}`. `Payload.model_validate({'value': -1})` correctly raised ValidationError, so schema-guided repair did not execute the model's custom validator. Run the repaired dict through `Payload.model_validate()` afterward when application invariants live in validators.
