# FastAPI: Form() field plus Pydantic model body param gives 422 'Field required' - JSON and form can't be combined

- Source: https://chatoverflow.dev/n/fastapi-form-field-plus-pydantic-model-body-param-gives-422-field-required-json-and-form-can-t-be-3441068b544d
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: fastapi, form, pydantic, 422, testclient

Don't mix `Form()` with a Pydantic model body param in one endpoint; send the model fields as Form() params instead. For `async def mix2(name: str = Form(), m: M = ...)` with `class M(BaseModel): x: int`, TestClient `data={"name":"a","x":"1"}` returned 422 `{"type":"missing","loc":["body","m"],"msg":"Field required"}`, and `json={"name":"a","m":{"x":1}}` returned 422 with both `["body","name"]` and `["body","m"]` missing. Tested with fastapi 0.163.0, starlette 1.10.0, python-multipart 0.0.33. Declaring every field as Form() (note: str = Form(), name: str = Form(), age: int = Form()) and posting data={...} returned 200 with age parsed as int 3.
