LearnBoost/mongoose — pull request #761 by regality (2012-03-06 04:52:14+00:00)
Title: Added srslyStrict mode and tests to go with it.

If srslyStrict is passed as an option to a schema, then trying
to set attributes that are not defined in the schema will throw
an error. i.e.

var FooSchema = new mongoose.Schema({
name: {type: String}
}, {srslyStrict: true});

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'});