-
Notifications
You must be signed in to change notification settings - Fork 156
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
Struct validation should return ValidationErrors instead of ValidationError #242
Comments
Thanks! So usually when doing the struct validation you stop at the first error. At least that is what I always do, no need to do further checks/work if we know it's not good. |
I think from a user perspective it would be helpful to not get caught in a trial/error loop. Especially if each transaction has an implied cost (I am working on a blockchain project). From what I can see it should be possible to offer both options? |
But you have individual field validation which behave the same way and you can hack it with Let's see what other people think. |
I agree with @wackazong here. Concrete examples:
|
I think that makes sense to change for the next version. |
@Keats do you mind if I do a PR for this feature? |
Sure but make sure to do it on #249 |
Any update on this feature? |
Thanks for putting this library together. I find it very easy and intuitive.
One question: are there plans to return
ValidationErrors
from struct validation instead of a single error? I think this would make much more sense since there can be multiple validation problems when validating the whole struct, probably related to specific fields.The text was updated successfully, but these errors were encountered: