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

Async validations #408

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Conversation

LeoIannacone
Copy link

@LeoIannacone LeoIannacone commented Nov 25, 2016

This allows always to validate fields with async functions.

@LeoIannacone LeoIannacone changed the title Form(setInputValidationErrors): ignore fields not in validationErrors Async validations Nov 29, 2016
@aesopwolf
Copy link
Collaborator

We probably won't merge anything in using Promise for awhile. Browser support is definitely getting better but IE still doesn't provide support. See #70 for a previous discussion.

@coleturner
Copy link

Async validation is a critical use case for me and I'm sure it would open up the potential for formsy-react to be used for a wider variety of validations. One example is checking for username uniqueness on a registration form.

The impression I get from formsy-react is that the best UX is having validations prior to submit, and indicating whether a form is valid by enabling the submit button. The only option as it stands is to validate on submit which is alarming because it negates that principle and the only other option is to roll your own.

Is there an ETA on when some form of asynchronous validation will be released?

Thanks!

@aesopwolf
Copy link
Collaborator

Have you looked into updateInputsWithError(errors)? I have a feeling that might solve your use case.

@LeoIannacone
Copy link
Author

We are actually using this implementation in production. Looks working very well, what you have to do is just have a "global Promise" object.
We are using: https://polyfill.io/v2/docs/

A simple async validation should return the Promise.

@logemann
Copy link

logemann commented May 6, 2018

This has never made it into the distro? Thats really unfortunate. I would need that badly.

@Semigradsky
Copy link
Collaborator

@SpadarShut this repo in unmaintained, see https://github.com/formsy/formsy-react/

Repository owner deleted a comment from Hermman Feb 4, 2022
@SpadarShut
Copy link

@Semigradsky thanks, I know. I was fixing that just for our corporate fork.

Commit the built files to the repo to be able to ue this package with Bun
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

Successfully merging this pull request may close these issues.

8 participants