# X_SCHEMA_DEFAULT_INVALID

## Means

a schema default fails its own schema

## Typical cause

`.default(value)` where `value` is one the schema itself refuses — `t.number.min(5).default(1)`. An omitted field then parsed to a value the same schema rejects when it is sent, and the published JSON Schema stated a default that violates its own bounds, so it is refused where it is WRITTEN, at the first import of the authoring file

## Fix

edit the `.default(…)` named in the stack so its value satisfies the rule quoted in `cause`, or relax that rule on the schema — then `bun test <the authoring file>.test.ts`

[Schema and validation](/error-codes#schema-and-validation)
