Define additional data for a constraint

Description

In our company we use java bean validation for our restful api's. With some constraints it would be helpful to have a bit more context then just a message.

Something like:

this would allow to have additional data in a constraint violation that can be used together with the message(template) to create a meaningful error response including some structured data, thus making it easy to read and interpret by a machine.

For sure such a feature needs quiet some polishing to make it suitable for all the possible cases. But at least i wanted it to be placed here for further discussion.

Environment

None

Status

Assignee

Unassigned

Reporter

Julien May

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure