z-schema
z-schema copied to clipboard
add keyword in error objects of getLastErrors()
The error objects returned by getLastErrors()
missing keyword, in above the keyword is required
.
Sample code is below:
var validator = new ZSchema();
var valid = validator.validate({abc: 123}, {
"properties": {
"type": {
"enum": ["common"]
}
},
"required": [
"type"
]
});
console.log(validator.getLastErrors());