Skip to content

Commit

Permalink
Old code out
Browse files Browse the repository at this point in the history
  • Loading branch information
mercmobily committed Jan 19, 2015
1 parent 567fb42 commit e8e2800
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions SimpleSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,9 @@ var SimpleSchema = declare( null, {
var resultObject = {}


// First of all, if it's not in the schema, it's not allowed
// First of all, if it's not in the schema, it's not allowed
for( var k in objectBeforeCast ){

// I ended up opting against this option
//if( Array.isArray( options.alwaysAllow ) && options.alwaysAllow.indexOf( k ) == -1 ){
//
// if( typeof( this.structure[ k ] ) === 'undefined' ){
// errors.push( { field: k, message: 'Field not allowed: ' + k } );
// }
//}

if( typeof( this.structure[ k ] ) === 'undefined' ){
errors.push( { field: k, message: 'Field not allowed: ' + k } );
}
Expand Down

0 comments on commit e8e2800

Please sign in to comment.