tmpfs / async-validate

Asynchronous type validation for node and the browser
Other
314 stars 45 forks source link

Make fields property required (remove shorthand) #50

Closed tmpfs closed 8 years ago

tmpfs commented 8 years ago

Whilst the shorthand is convenient it makes the code more complex than it needs to be and will make schemas more readable by enforcing a fields property.

This will mean that instead of:

{
  name: {type: 'string'}
}

It must be:

{
  fields: {
    name: {type: 'string'}
  }
}