Skip to content

How to validate only given properties exist? #42

@trusktr

Description

@trusktr

How do we specify that any fields other than the ones specified are not allowed? SO, f.e., I want this:

var Thing = schema({
  foo: Number
})

Thing({foo: 5}) // true
Thing({foo: 5, bar: "blah"}) // false, because `blah` isn't a specified property.

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