> ## Documentation Index
> Fetch the complete documentation index at: https://developer.maatstays.wtf/llms.txt
> Use this file to discover all available pages before exploring further.

# ValidationErrorCode

> Which rule a rejected field broke.

Show it beside the field; do not switch on it. Most are the request validator's own
rule names; a few name a check that needs something your request does not carry, such
as the currency a listing is priced in. Either way the list can gain members, and an
unrecognised value means exactly what a recognised one does: that field was not
accepted. `field` is the part to act on.

## Values

| Value | Meaning |
| - | - |
| `invalid_type` | A string where a number was expected, an object where an array was, and so on. |
| `invalid_value` | Not one of the values the field accepts. |
| `invalid_format` | The right type, in the wrong shape — a date, a UUID, a URL. |
| `too_small` | Below a minimum: a number, a length, or a count. |
| `too_big` | Above a maximum: a number, a length, or a count. |
| `not_multiple_of` | A number that is not a permitted step. |
| `unrecognized_keys` | A field this contract does not accept. `field` names it. |
| `invalid_union` | None of the shapes the field may take matched. |
| `invalid_key` | A key in a map-shaped field was not accepted. |
| `invalid_element` | An entry in a collection-shaped field was not accepted. |
| `custom` | A rule specific to this contract — a cross-field constraint, usually. |
| `invalid` | The validator gave no rule name. Read `field` and the schema. |
| `currency_mismatch` | An amount in a currency the listing is not priced in. Amounts are never converted. |
| `duplicate_value` | The same entry appears twice where each may appear once. |
| `unsupported_param_kind` | The value this quick action takes is of a kind this contract does not publish. |
| `unavailable` | Names something real that has since been withdrawn and can no longer be set. |
| `unknown_template` | Names a template that is not currently published. Stop sending that key until it is. |

## In Maat

The published set is exactly Maat's own `ProblemFieldErrorCode`. A member added to one and not the other fails our build.

## Where it appears

**Fields**

* `ValidationError` · `code`

**Operations**

* `POST /token` — Exchange your API key for a token


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.