# pydantic.error_wrappers.ValidationError: 1 validation error for User

- **ID:** `python/fastapi-pydantic-validationerror`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Data passed to a Pydantic model doesn't match its schema.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |
| 2.5.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   User(name='John', age=30)  # age must be int
   ```
2. **** (90% success)
   ```
   @field_validator('age')
def parse_age(cls, v):
    return int(v)
   ```

## Dead Ends

- **** — Only ignores extra fields, not type errors. (70% fail)
- **** — Same validation applies. (90% fail)
