#33: Add more context to validation messages

Merged
#68 · Created  · Last updated

Merged pull request

Merged in 33-add-message-context (pull request #68)

996cb7e·Author: ·Closed by: ·2018-04-17

Description

There's still some testing I want to do, but this is for feedback on the approach

This PR adds additional contextual information to validation messages to make it easier for users to build tooling that responds to validation failures, or to identify the cause of a validation failure.

I tried not to break APIs, and so instead of weaving the context through all the validators I instead collect context information and merge it together after validation. The downside is more object creation (as everything is immutable) but we're not expecting many messages to be created per request/response interaction.

0 attachments

0 comments

Loading commits...