Skip to content

fix(ui): keep submitted state when a submit skips validation - #18302

Open
benjaminkincses wants to merge 1 commit into
payloadcms:mainfrom
benjaminkincses:fix/ui-autosave-submitted-state
Open

benjaminkincses wants to merge 1 commit into
payloadcms:mainfrom
benjaminkincses:fix/ui-autosave-submitted-state

Conversation

@benjaminkincses

Copy link
Copy Markdown
Contributor

Fixes #18300.

Problem: after a failed publish, validation highlights show correctly. The next autosave (or draft save) succeeds and clears the submitted state, so every error indicator disappears while the document is still invalid.

Fix: the Form submit success branch no longer clears submitted when the submit skipped validation. A submit that skipped validation cannot know the form is valid.

Verified: confirmed the success branch cleared submitted unconditionally on pristine code and is guarded after the fix. Normal validating submits still clear it. esbuild compile passes.

@benjaminkincses
benjaminkincses marked this pull request as ready for review September 24, 2026 20:27

This branch has not been deployed

No deployments
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.

Successful autosave clears validation error state after a failed publish (setSubmitted(false) on skipValidation submits)

1 participant