js-schema icon indicating copy to clipboard operation
js-schema copied to clipboard

Adding error text for nothingSchema validation

Open Cyri-L opened this issue 8 years ago • 1 comments

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
    },

Cyri-L avatar Mar 02 '16 13:03 Cyri-L

ping @molnarg

YouriT avatar Dec 19 '16 16:12 YouriT