Required fields validated inside an optional object

Builder public api key

1162ece101bb43d0ba429df56e2009cd

Builder content link

Detailed steps to reproduce the bug

  1. Add an object field to a data model and mark it not required
  2. Add child fields inside the object, each marked required
  3. Create a content entry and leave the object empty
  4. Click Publish — every required child field reports a validation error, even though the parent object is optional and untouched

This is a regression; the same model published fine until recently.

Expected vs actual

  • Expected: an empty optional object passes validation regardless of its children’s required flags
  • Actual: required validation on the children fires unconditionally, blocking publish

Code stack

Next.js 16.2.4, React 19.2.5, Vercel

Workaround

Removed required from the child fields so editors can publish. Downside: editors can now publish incomplete entries, and the frontend has to defensively handle fields that were previously guaranteed.