Skip to content

Creating new schema with undefined rule should fail #1

@iamvanja

Description

@iamvanja

Consider this scenario:

const schema = new Schema({ email: undefined })

This should IMHO fail or at least spit out a warning.

Now validating values against this schema returns an empyy object as if validation is passed.

// output: {}
schema.validate({ email: 'aaaa' })

If creating new schema did not fail, this should certainly fail.

I don't mind working on this if there is interest and agreement how this should be handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions