Skip to content

Fix null display logic validation and show validation errors on save - #1126

Merged
idormenco merged 1 commit into
mainfrom
fix/form-validation-feedback
Oct 19, 2026
Merged

idormenco merged 1 commit into
mainfrom
fix/form-validation-feedback

Conversation

@idormenco

Copy link
Copy Markdown
Contributor

Summary

  • Fix "Expected array, received null" on display logic: the API returns null for the unused display logic field (optionIds for Includes, value for AnyOf/All). The editor passed the null through, but the zod schema only allows undefined. Both fields are now normalized to undefined when the form loads.
  • Translation editor: it now loads display logic optionIds. Before, saving a translation dropped the selected options of AnyOf/All conditions.
  • Validation feedback: pressing Save on an invalid form now shows a toast listing the errors (e.g. Question 3 (Q3) › Display logic options: ...). This helps when the error is on a tab that isn't open.

Test plan

  • Open a form with an existing "Includes" display logic condition: no validation error is shown and it saves
  • Save translations for a form with AnyOf/All display logic: the selected options are kept
  • Clear a required field (e.g. form name) and press Save: a toast lists the error

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
votemonitor Ready Ready Preview Oct 19, 2026 9:18am UTC

Request Review

… save

- Normalize null display logic value/optionIds returned by the API to
  undefined, so existing questions no longer fail validation with
  "Expected array, received null".
- Load display logic optionIds in the translation editor so AnyOf/All
  conditions are not dropped when saving translations.
- Show a toast listing validation errors when saving an invalid form.
@idormenco
idormenco force-pushed the fix/form-validation-feedback branch from bc5ba11 to 578acc1 Compare October 19, 2026 09:17
@idormenco
idormenco merged commit 4533cf3 into main Oct 19, 2026
3 checks passed
@idormenco
idormenco deleted the fix/form-validation-feedback branch October 19, 2026 09:20

This branch was successfully deployed

1 active deployment
Preview — 578acc17 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant