Skip to content

Conversation

@mj12albert
Copy link
Member

@mj12albert mj12albert commented Dec 2, 2025

Form:

const actionsRef = React.useRef<Form.Actions>(null);

<Form actionsRef={actionsRef} />>

// validate all fields
actionsRef.current?.validate();
// validate one field by name
actionsRef.current?.validate('username');

Field:

const actionsRef = React.useRef<Field.Root.Actions>(null);

<Field.Root actionsRef={actionsRef} />>

// validate the field
actionsRef.current?.validate();

Closes #3323

@mj12albert mj12albert added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. component: form Changes related to the form component. labels Dec 2, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3395
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3395
    

commit: 40c2427

@mui-bot
Copy link

mui-bot commented Dec 2, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+366B(+0.09%) 🔺+105B(+0.08%)

Details of bundle changes


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

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 40c2427
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6936e059fc84d50008c10d97
😎 Deploy Preview https://deploy-preview-3395--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@mj12albert mj12albert force-pushed the form/actions-ref branch 2 times, most recently from eaf2a86 to cb13f43 Compare December 4, 2025 20:05
@mj12albert mj12albert added the component: field Changes related to the field component. label Dec 8, 2025
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. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to trigger initial validation in Field.Root?

2 participants