-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Feature request - sequential validations #278
Comments
I have exactly the same issue - +1 for me |
Are your expensive validators server-side? If so how are you dealing with authentication without access to services? |
Maybe a better fix would be a default feature to run all sync validators first and only run async validators if the sync ones all pass? |
@BryanCrotaz I'm using fetch for the async validators, and have utility functions to configure the fetch to work with the server. Luckily it works without a service: it would be better implemented if I could use a service. |
@lindyhopchris That would be a great addition to this library. Perhaps exported from |
@snewcomer great, I'll put together a PR. Hopefully I should have some open source time this coming week to sort it out. |
@lindyhopchris Lmk if this is something you still want to take on! Happy to do it if you are busy. |
@snewcomer I am still happy to do it, but not sure quite when I can get to it. Possibly this week. |
Using #220 as inspiration, I'm frequently using this custom validator in my code:
My use case is exactly the same as the linked issue - I have expensive async custom validators that there's no point calling if other validators fail. Example use case:
I think this sequential validator is really useful as this use case is common. So my question is - would you accept a PR adding it to this package?
If yes, then two questions:
The text was updated successfully, but these errors were encountered: