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!
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!