-
Notifications
You must be signed in to change notification settings - Fork 126
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
Support for async validations #112
Comments
There's an open issue regarding this topic in the old repo: christianalfoni/formsy-react#261 |
@mchurichi I see a long time passed since you opened this issue. Any luck with this? I like |
@yantakus sorry for the late response, no luck with this issue, I used the second workaround mentioned in my first comment, which is a bit hacky, but it works. |
I can help update the code to the latest version if there's a wish to merge it. |
+1 feature needed. |
The code is definitely far too different now, but the project is open to new PRs. I'm unsure of the feasibility of this, but it could be as easy as some |
Unfinished and out of date PR, but useful reference for anyone who wants to take this on: #340 |
Not yet implemented? NEEDED! May be I can help. |
Yes, you probably can @1aerostorm. Please feel free to open a PR. If you have any questions I would happily answer them. |
Is there a declarative way to add custom async validations for an specific field?
I'm trying to add server side validations for an specific field that run whenever a field value changes and the suggested solution I found is allow the user to submit the whole form, validate it in the server side, return the result and use updateInputsWithError to set the errors in the input, if any. This could work well is not the best from the UX perspective.
Another solution I can think of could be use the onChange event on the Formsy wrapped component to dispatch the needed server side validation, but this sounds a bit hacky, and since formsy already has a great custom validations support would be wonderful if I can use that.
There is a PR (christianalfoni/formsy-react#408) in the old repo that was discarded because it uses Promises, but it's like 2 years old and things have changed since then.
Any thoughts?. Thanks.
The text was updated successfully, but these errors were encountered: