LearnBoost/mongoose — pull request #833 by regality (2012-04-13 21:07:35+00:00)
Title: Can now set strict to "throw" to prevent extra fields.

If strict is set to `"throw"`, then passing extra fields into the model will throw an error.

```javascript
var FooSchema = new mongoose.Schema({
name: {type: String}
}, {strict: "throw"});

var Foo = mongoose.model('Foo', FooSchema);

// this will throw an error because foo is not in the schema
var foo = new Foo({name: 'hai', foo: 'bar'});
```

Sorry about this being the third pull request, I didn't read closely enough last time to grok what you were saying. I think this one is the winner.