structured-jayschema-errors
Version:
Return jayschema error messages with the same structure as the validated data
23 lines • 491 B
JavaScript
module.exports = {
data: [
{
"things": "notOkay",
"stuff": 2
}
],
schema: {
"type": "object",
"required": ["things", "stuff"],
"additionalProperties": true,
"isEntity": true,
"properties": {
"things": {
"type": "string",
"enum": ["okay", "acceptable"]
},
"stuff": {
"type": "number"
}
}
}
};