# TSR1504: The validator for '…' is … KB, over the … KB budget. Validate a smaller type or raise '[sound.guard] max-validator-kb'.

> The generated validator for a type is larger than the size budget (8 KB by default). Validate a smaller type or raise max-validator-kb.

## What it means

Each `parse<T>` call generates validator code that ends up in your bundle. A validator over the budget (8 KB by default, `[sound.guard] max-validator-kb`) is reported so large validators don't slip into bundles unnoticed.

## How to fix

- Validate a smaller type, for example the part of a response you actually use (`Pick<T, ...>`).
- Or raise the budget: `[sound.guard] max-validator-kb` in `ts-r.toml`.

Sound mode is defined in [design record 0007](https://github.com/Webb-Ventures/typescript-rust/blob/main/docs/design/0007-sound-mode.md) (accepted 2026-10-15).

Source: https://ts-r.dev/errors/TSR1504/
