Skip to content
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

[Feature] Ability to configure different validations to run at different times #195

Open
SilentRhetoric opened this issue Mar 15, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@SilentRhetoric
Copy link

I would like to be able to configure the form to have certain validations run at different times than other validations.

For example, one validation may make sense only to run on submit, while others should run on input for real-time feedback to the user.

A simple use case is the required validation, which feels natural to apply on submit, but feels aggressive when it throws an error if the user is working their way through the form and may have touched a field but is not yet ready to submit.

In other cases, immediate feedback about the input value is important, such as limiting the input to a certain maximum and giving the user immediate feedback so they can correct it while they are working on that field, rather than needing to go back and fix it upon submission.

Hope that makes sense! Thanks for all you do to create and maintain this library!

@fabian-hiller
Copy link
Owner

Thank you for creating this issue. For simple forms you can manually trigger validate for specific fields as a workaround. Don't expect a quick response to this issue as I am currently focused on my other library Valibot.

@fabian-hiller fabian-hiller self-assigned this Mar 15, 2024
@fabian-hiller fabian-hiller added the enhancement New feature or request label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants