Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding error text for nothingSchema validation #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Adding error text for nothingSchema validation #47

wants to merge 3 commits into from

Conversation

Cyri-L
Copy link

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

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
Copy link

YouriT commented Dec 19, 2016

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