Provide Detailed and Specific Information in Validation Report

Issue #401 new
Ryan Daniels created an issue

Our company has a very specific error message format. In separate fields in a JSON object, it tells the users:

  • In which part of the request the problem occurred (header, body, etc.)
  • The validation message
  • If the body, the JSON pointer to the problem field
  • The value which had the problem

I thought that this would be no problem, just create a custom implementation of the ValidationReportHandler.

But, the ValidationReport does not have nearly enough information to construct this kind of detail message. It seems to only give me this type of pre-formatted error message, and not details about the pieces used to created it:

[Path '/value'] ECMA 262 regex "^[a-zA-Z0-9]{8,34}$" does not match input string "1"

Please provide as many details and contextual information as possible in the ValidationReport so that applications can decide the structure of their message to users and not be limited to the hard-coded format.

Comments (1)

  1. Log in to comment