Skip to content

[field] Run validate function after native validations #1926

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: master
Choose a base branch
from

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented May 15, 2025

Demo: https://codesandbox.io/p/devbox/serene-brahmagupta-xgncdd

Currently a custom validation function will run before any native validations (e.g. required)

It makes more sense for the basic native checks to run before custom (presumably more complicated) checks, otherwise you'd have to recreate the native checks in the custom function

Closes #1904

Copy link

pkg-pr-new bot commented May 15, 2025

Open in StackBlitz

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

commit: d16170e

Copy link

netlify bot commented May 15, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit d16170e
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6827425cf27c520008e6ed1d
😎 Deploy Preview https://deploy-preview-1926--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 field/custom-validate-after-native branch from f4a8e2c to c875b2d Compare May 16, 2025 03:42
@mj12albert mj12albert force-pushed the field/custom-validate-after-native branch from c875b2d to 9d8f7b6 Compare May 16, 2025 13:20
@mj12albert mj12albert force-pushed the field/custom-validate-after-native branch from 9d8f7b6 to d16170e Compare May 16, 2025 13:49
@mj12albert mj12albert changed the title [Field] Run validate function after native validations [field] Run validate function after native validations May 16, 2025
@mj12albert mj12albert marked this pull request as ready for review May 16, 2025 13:59
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.

[field] Option or way to run the validation function after checkValidity
1 participant