Skip to content

Adding error text for nothingSchema validation#47

Open
Cyri-L wants to merge 3 commits into
molnarg:masterfrom
swanest:master
Open

Adding error text for nothingSchema validation#47
Cyri-L wants to merge 3 commits into
molnarg:masterfrom
swanest:master

Conversation

@Cyri-L

@Cyri-L Cyri-L commented Mar 2, 2016

Copy link
Copy Markdown

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

@YouriT

YouriT commented Dec 19, 2016

Copy link
Copy Markdown

ping @molnarg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants