# fastapi.exceptions.RequestValidationError: 1 validation error for Model
body -> age
  value is not a valid integer (type=type_error.integer)

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

## Root Cause

A Pydantic int field receives a non-numeric string or float with fractional part from the JSON body.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   requests.post(url, json={'age': int(age_str)})
   ```
2. **** (90% success)
   ```
   from pydantic import field_validator
@field_validator('age', mode='before')
def parse_age(cls, v):
    return int(v)
   ```

## Dead Ends

- **** — Downstream arithmetic fails with TypeError. (80% fail)
- **** — Hides bad data and corrupts records. (85% fail)
