Skip to content

fix(ui): disable (or rather don't enable) form validation after draft submit error #12918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

philipp-tailor
Copy link
Contributor

@philipp-tailor philipp-tailor commented Jun 24, 2025

Follow-up to #12893.

What?

Removes cases where submitting a document as a draft in a collection with versioning enabled would cause publishing validation errors to be displayed on further document form changes. An example case is when saving the draft failed due to a beforeChange hook throwing an APIError.

How

The behavior change is that the form state is marked as un-submitted post a submit failure as a draft. The form not being considered as submitted results in packages/ui/src/views/Edit/index.tsx to use skipValidation: true.

Removes case where submitting a document as a draft in a collection
with versioning enabled would cause publishing validation errors to be
displayed on further document form changes. An example case is when
saving the draft failed due to a `beforeChange` hook throwing an
`APIError`.

The code change applies to any failing document submit where there's
no field related error, but just generic errors. The behavior change
is that the form state is marked as un-submitted, which in turn
results in `packages/ui/src/views/Edit/index.tsx` to use
`skipValidation: true`.
Removes cases where submitting a document as a draft in a collection
with versioning enabled would cause publishing validation errors to be
displayed on further document form changes. An example case is when
saving the draft failed due to a `beforeChange` hook throwing an
`APIError`.

The behavior change is that the form state is marked as un-submitted
post a submit failure as a draft. The form not being considered as
submitted results in `packages/ui/src/views/Edit/index.tsx` to use
`skipValidation: true`.
@philipp-tailor philipp-tailor changed the title fix(UI): Do not enable form validation after draft submit error fix(ui): Do not enable form validation after draft submit error Jun 24, 2025
@philipp-tailor philipp-tailor changed the title fix(ui): Do not enable form validation after draft submit error fix(ui): don't enable form validation after draft submit error Jun 24, 2025
@philipp-tailor philipp-tailor changed the title fix(ui): don't enable form validation after draft submit error fix(ui): disable (or rather don't enable) form validation after draft submit error Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant