Skip to content
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 returning multiple validation errors #6

Open
fenollp opened this issue Oct 17, 2024 · 2 comments
Open

Support returning multiple validation errors #6

fenollp opened this issue Oct 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@fenollp
Copy link

fenollp commented Oct 17, 2024

Today, validation ends on the first validation error encountered.

This asks that all validation errors be aggregated in some kind of collection, so all validation errors (or at least, as many as possible or that makes sense) are returned.

This can be behind a generation flag so both behaviors can be generated. Generating both at once (so both ways are available at runtime) should probably not be a goal.

@Adphi Adphi added the enhancement New feature or request label Oct 17, 2024
@Adphi
Copy link
Member

Adphi commented Oct 17, 2024

Maybe we could add a second method validate_all to the Validator trait.

@Adphi
Copy link
Member

Adphi commented Oct 19, 2024

@fenollp It shouldn't be too hard to implement.
Do you want to give it a go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants