Skip to content

Validate all parameters, even on error. #24

Description

@dwright

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions