Skip to content

Async validations#408

Open
LeoIannacone wants to merge 21 commits into
christianalfoni:masterfrom
plentific:master
Open

Async validations#408
LeoIannacone wants to merge 21 commits into
christianalfoni:masterfrom
plentific:master

Conversation

@LeoIannacone
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Collaborator

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

@LeoIannacone
Copy link
Copy Markdown
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
Copy Markdown

logemann commented May 6, 2018

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

@Semigradsky
Copy link
Copy Markdown
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
Copy Markdown

@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