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

Validate all parameters, even on error. #24

Open
dwright opened this issue Feb 1, 2018 · 0 comments
Open

Validate all parameters, even on error. #24

dwright opened this issue Feb 1, 2018 · 0 comments

Comments

@dwright
Copy link

dwright commented Feb 1, 2018

Currently, Params::ValidationCompiler throws an exception on the very first error it encounters. This is fine for many applications.

However, there are times when it may be useful to report on all parameters that failed to validate. For example: When validating user input from a web page, it's useful to be able to give feedback to the user on all fields that were invalid, rather than asking them to update the fields one at a time.

I propose that Params::ValidationCompiler should have an API that gives the user the option of failing on the very first exception, or testing all parameters and then throwing a list of exceptions.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant