Meteor-Community-Packages / meteor-simple-schema

Meteor integration package for simpl-schema
https://github.com/Meteor-Community-Packages/meteor-simple-schema
MIT License
920 stars 162 forks source link

SimpleScheme allows property with empty string as key #703

Closed mtrunkat closed 6 years ago

mtrunkat commented 7 years ago
const Schema = new SimpleSchema({
    keyOne: {
        type: String,
    },
    keyTwo: {
        type: String,
    },
});

check({ keyOne: 'foo', keyTwo: 'bar' }, Schema); // works

// This is it:
check({ keyOne: 'foo', keyTwo: 'bar', '': 'something' }, Schema); // works

check({ keyOne: 'foo', keyTwo: 'bar', keyThree: 'something' }, Schema); // throws exception
aldeed commented 6 years ago

The Meteor SimpleSchema package is no longer maintained other than critical fixes to keep it running with each latest Meteor release. Closing non-critical issues in this repo. Anyone who cares about this may do one or more of the following: