---
title: "Name every field that failed · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/errors/validation-errors
updated: 2026-10-20
licence: "All rights reserved"
---

# Name every field that failed

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Errors](https://agentwranglers.se/playbook/api-design/errors)
- Rule: When input fails validation, return every failing field at once, with where it is and why it failed.
- How: Add an `errors` array to the problem details. Give each entry a JSON Pointer to the field and a plain reason. RFC 9457 shows this pattern.
- Check: Send a body with two invalid fields. The answer lists both, with pointers such as `#/items/0/quantity`.

Example:

```json
{
  "type": "https://api.example.com/problems/invalid-input",
  "title": "The request has invalid fields",
  "status": 422,
  "detail": "2 fields are invalid.",
  "errors": [
    { "pointer": "#/items/0/quantity", "detail": "Must be 1 or more." },
    { "pointer": "#/email", "detail": "Must be an email address." }
  ]
}
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/errors/validation-errors`.

- Previous: [Keep error types stable](https://agentwranglers.se/playbook/api-design/errors/stable-error-types)
- Next: [Hide internals in errors](https://agentwranglers.se/playbook/api-design/errors/no-internal-details)
- [Errors](https://agentwranglers.se/playbook/api-design/errors)
