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

Form not calling formatOnBlur before validating when submitted using Enter key #1044

Open
anmol-kansal-ds opened this issue Jan 7, 2025 · 0 comments

Comments

@anmol-kansal-ds
Copy link

I have a very simple form which have a text input. I'm using format function and formatOnBlur: true to trim the strings. I want to run validations after the string has been trimmed (i.e. after format function has been called)

Are you submitting a bug report or a feature request?

Bug report.

What is the current behavior?

It works fine if I type "react " in the input and clicks on submit button. It shows error correctly. But if I hit Enter instead of click, it submits successfully and do not show any error.

What is the expected behavior?

It should perform validations after formatting the field and should throw the error when I hit Enter key.

Sandbox Link

https://codesandbox.io/p/sandbox/3gzzkl

What's your environment?

Latest (you can find these in the sandbox).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant