keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

widget field validation is not respected

Open stefanprobst opened this issue 9 months ago • 0 comments

when a custom richtext-field widget defines required fields in their schema, the validation is not respected and the document can be saved even when the required fields have not been filled out.

repro: https://github.com/stefanprobst/issue-keystatic-widget-field-validation

steps to reproduce:

  • clone the above repo
  • pnpm install && pnpm run dev
  • open http://localhost:3000/keystatic
  • create a new Post and add a "Widget" widget, without filling out anything, and click Save
  • the document is saved even though the "Widget" has a required field in its schema: https://github.com/stefanprobst/issue-keystatic-widget-field-validation/blob/fb9c2048134d1e9dc2e4eb9e81073cd786d56cfe/keystatic.config.tsx#L26

stefanprobst avatar Mar 13 '25 07:03 stefanprobst