Learn

Validation Errors

How to read and resolve validation errors when Cuddler rejects data or template input.

Troubleshooting path

How to work a validation error

Validation errors are signals that the input contract is wrong or incomplete before rendering begins.

1Read the error path and code

Start with the exact field and failure category the validator reports.

2Check required, type, and version

These are the fastest causes to verify first.

3Fix the data or schema

Correct the contract boundary instead of trying to force rendering through it.

4Revalidate before render

Use a clean validation pass as the signal that the input is ready again.

A renderable document starts with a valid document.

Validation errors mean the input did not satisfy the contract before rendering began.

Treat them as a signal that the document shape, the schema version, or the field-level instructions need attention. The goal is not to force rendering through the failure. The goal is to make the input correct enough that rendering can proceed safely.

Check These First

  • Confirm the error path points to the field you expected.
  • Confirm the field is present when the schema marks it required.
  • Confirm the field type matches the schema definition.
  • Confirm the data uses the same version family as the schema it is meant to satisfy.

Common Causes

  • A required field is missing from the data document.
  • A value is present, but the type does not match the schema.
  • The schema version changed, but the document was not updated with it.
  • The template expects a field that the data document does not actually provide.
  1. Correct the data document first.
  2. Re-run data validation.
  3. If the failure comes from a template expectation, correct the template separately.
  4. Only render again after both sides validate cleanly.