Skip to content

How to validate only given properties exist? #42

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.

Activity

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

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