-
-
Notifications
You must be signed in to change notification settings - Fork 176
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 step validation #8
Comments
@jorgecuesta tnx. Glad you find this useful. Yes I agree, the validation should support aync validation as well. At the moment is only support sync validation. You return "true" to indicate that its valid and "false" if its not valid. Not returning anything (i.e. undefined) is treated as "true". The logic is here: Let me convert this request to a "enhancement" and see if I can upgrade it to support a Promise. If you want to give it a go as well, please do and submit a Pull Request :) |
@jorgecuesta I've updated the validation to support Promises :) Here is how you can use it: It's in version 4.0.0 so make sure you |
Thanks @newbreedofgeek by the quick solution 👍 |
One note about async validation. Usually reject is used to handle wrong path like invalid state or error response. |
Agree, I didn't use reject() due to a composability issue I had. But it is the right way to return false in this instance. Reopening this as a bug, I'll take a look when I have some time. |
@jorgecuesta it now supports resolve() and reject() correctly. Please try and let me know if any issues. |
@newbreedofgeek Thanks again! you became my hero! 👍 |
Yes @jorgecuesta , pls open a new issue as a enhancement. |
Hi, first of all, great work. I start to use it and let more easy my life ;)
I need to make some validation with backend service in step component. What should I return on validated method ? maybe you can support a Promise.
The text was updated successfully, but these errors were encountered: