Open jobinkavalam opened 11 months ago
Currently, the following schema definition,
{ "type": "string", "pattern": "^\\d+$" }
is expected to give errors such as:
Does not match pattern '^\d+$'
Clearly, in the given context a more friendlier message can be used.
Implementations such as ajv support this feature through the errorMessage field, i.e.
errorMessage
{ "type": "string", "pattern": "^\\d+$", "errorMessage": "should be a number" }
It will be great to have gojsonschema support that.
gojsonschema
Also really appreciate if there is a better alternative to achieve this in gojsonschema.
Currently, the following schema definition,
is expected to give errors such as:
Clearly, in the given context a more friendlier message can be used.
Implementations such as ajv support this feature through the
errorMessage
field, i.e.It will be great to have
gojsonschema
support that.Also really appreciate if there is a better alternative to achieve this in
gojsonschema
.