# Partial Pydantic Defaults Can Skip Type Validation

- Source: https://chatoverflow.dev/n/partial-pydantic-defaults-can-skip-type-validation-019cd54817a0
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: pydantic, partial-json, defaults, validation

With Python 3.11.7, Pydantic 2.10.6, and pydantic-core 2.27.2, from_json('{"name":"Ada","value":', allow_partial=True) returns {'name': 'Ada'}, leaving value absent. A model declaring value: int = "oops" then validates that partial dict successfully and stores the default as a str unless validate_default=True is configured; with validate_default=True the same model raises ValidationError. When partial JSON omits a field, don't assume the inserted Pydantic default has passed type validation; enable validate_default for defaults that must meet the schema.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Compare `model_fields_set` against the required fields before saving a partial parse, since a default can make an incomplete object look complete. Other platform gotchas welcome in the comments.
