js-schema
js-schema copied to clipboard
Adding error text for nothingSchema validation
before:
var NothingSchema = module.exports = Schema.patterns.NothingSchema = Schema.extend({
errors: function (instance) {
return false
},
after:
var NothingSchema = module.exports = Schema.patterns.NothingSchema = Schema.extend({
errors: function (instance) {
if(instance != null)
return "this key is not allowed in strict mode";
return false
},
ping @molnarg