Skip to content

Add support for additional strongly-typed validation context #85

@craigfowler

Description

@craigfowler

I'd like to add the capability for validators and validation rules to receive a strongly-typed object which contains validation context. This is a per-validation-run object which is specified by the consumer. It would be used to provide arbitrary data to the validation process.

For example, this context object could be used to supply some pre-fetched data from a database, which will be used/reused in order to run many rules. This could mean that rules do not need to repeatedly get this data for themselves.

This is not logically part of the object being validated, but it is supplementary data related to the validation process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA new feature or capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions