base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[field] Add `formValues` arg to custom `validate` function

Open mj12albert opened this issue 6 months ago • 2 comments

Demo: https://codesandbox.io/p/sandbox/eloquent-wright-sff4fm

Enables validating a field based on the value of another field, e.g. confirmPassword and password

mj12albert avatar May 19 '25 14:05 mj12albert

Deploy Preview for base-ui ready!

Name Link
Latest commit 7d34e726f8f8b7a7509392889c1aef325d9f2fdd
Latest deploy log https://app.netlify.com/projects/base-ui/deploys/684157c6de2b3b0008aa5d48
Deploy Preview https://deploy-preview-1941--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.

netlify[bot] avatar May 19 '25 14:05 netlify[bot]

Open in StackBlitz

npm i https://pkg.pr.new/@base-ui-components/react@1941

commit: 7d34e72

pkg-pr-new[bot] avatar May 19 '25 14:05 pkg-pr-new[bot]

Bundle size report

Total Size Change:${\tiny{\color{red}▲}}$+2.11KB(+0.15%) - Total Gzip Change:${\tiny{\color{red}▲}}$+766B(+0.16%) Files: 41 total (0 added, 0 removed, 11 changed)

@base-ui-components/reactparsed:${\tiny{\color{red}▲}}$+331B(+0.11%) gzip:${\tiny{\color{red}▲}}$+110B(+0.12%)

Show 10 more bundle changes

@base-ui-components/react/number-fieldparsed:${\tiny{\color{red}▲}}$+185B(+0.65%) gzip:${\tiny{\color{red}▲}}$+66B(+0.65%) @base-ui-components/react/radio-groupparsed:${\tiny{\color{red}▲}}$+185B(+0.94%) gzip:${\tiny{\color{red}▲}}$+64B(+0.85%) @base-ui-components/react/sliderparsed:${\tiny{\color{red}▲}}$+181B(+0.73%) gzip:${\tiny{\color{red}▲}}$+67B(+0.73%) @base-ui-components/react/checkboxparsed:${\tiny{\color{red}▲}}$+180B(+1.03%) gzip:${\tiny{\color{red}▲}}$+68B(+1.02%) Base UI checkboxparsed:${\tiny{\color{red}▲}}$+180B(+1.02%) gzip:${\tiny{\color{red}▲}}$+66B(+0.99%) @base-ui-components/react/checkbox-groupparsed:${\tiny{\color{red}▲}}$+179B(+1.55%) gzip:${\tiny{\color{red}▲}}$+68B(+1.47%) @base-ui-components/react/selectparsed:${\tiny{\color{red}▲}}$+179B(+0.16%) gzip:${\tiny{\color{red}▲}}$+71B(+0.19%) @base-ui-components/react/switchparsed:${\tiny{\color{red}▲}}$+179B(+1.30%) gzip:${\tiny{\color{red}▲}}$+61B(+1.14%) @base-ui-components/react/fieldparsed:${\tiny{\color{red}▲}}$+164B(+1.19%) gzip:${\tiny{\color{red}▲}}$+64B(+1.22%) @base-ui-components/react/inputparsed:${\tiny{\color{red}▲}}$+164B(+1.50%) gzip:${\tiny{\color{red}▲}}$+61B(+1.40%)

Details of bundle changes

Generated by :no_entry_sign: dangerJS against 7d34e726f8f8b7a7509392889c1aef325d9f2fdd

mui-bot avatar Jun 02 '25 09:06 mui-bot