Skip to content

[form] Fix validation bugs#4894

Draft
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/form-bugs
Draft

[form] Fix validation bugs#4894
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/form-bugs

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 22, 2026

This fixes a small batch of Form bugs found during review.

Changes

  • Allow submit to continue when async field validation is still pending unless a field is already explicitly invalid.
  • Reset Base UI field validation and state after native form reset.
  • Make Form docs snippets safer by JSON-stringifying fetch bodies and null-checking actionsRef examples.

Original findings addressed

  • [P2] Async validators could block the first valid submit.
  • [P2] Native reset did not clear Base UI field state.
  • [P3] Public docs examples had copy-paste issues.

@atomiks atomiks added type: bug It doesn't behave as expected. component: form Changes related to the form component. component: field Changes related to the field component. docs Improvements or additions to the documentation. labels May 22, 2026 — with ChatGPT Codex Connector
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 22, 2026

commit: 49870ba

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 22, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+262B(+0.06%) 🔺+100B(+0.07%)

Details of bundle changes

Performance

Total duration: 1,167.09 ms -81.93 ms(-6.6%) | Renders: 50 (+0) | Paint: 1,806.36 ms -89.03 ms(-4.7%)

Test Duration Renders
Slider mount (300 instances) 156.97 ms ▼-44.81 ms(-22.2%) 3 (+0)

11 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 49870ba
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a105075e95ee50008560a7e
😎 Deploy Preview https://deploy-preview-4894--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: field Changes related to the field component. component: form Changes related to the form component. docs Improvements or additions to the documentation. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant