---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/type-aliases/ValidationMode.md
---
[Reference](../../../index.md) / [@getenginex/sdk](../index.md) / ValidationMode

# ValidationMode

> **ValidationMode** = `"warn"` | `"strict"`

How to handle responses that do not match the schema:
`'warn'` warns via `onValidationIssue` and carries on; `'strict'` throws `VALIDATION_ERROR`. In `'warn'`,
only the diverging fields arrive as they came (keys in camelCase); the rest of the response is still
converted (lists unwrapped, enums normalized, money as `number`, defaults filled in).
If the root itself does not have the expected shape (e.g. text instead of an object), `'warn'` also
throws `VALIDATION_ERROR`. Money and currency never arrive raw: a value that is not a safe integer in
minor units (e.g. ≥ 2^53, which `JSON.parse` has already rounded), a currency code outside
`/^[A-Z]{3}$/` or decimal places outside 0 to 8 make the whole response (including a list)
throw `VALIDATION_ERROR` in `'warn'` too, after notifying `onValidationIssue`. Without
`onValidationIssue` configured, `'warn'` still warns by default via `console.warn` — once per
route per client, with only the route and the field paths, never the response values.
