[SOLVED] Simple schema common fields


#1

If alot of my schemas have the following fields in common:

owner: {
    type: String,
    label: "You",
    optional: true
},created: {
    type: Date,
    label: "Date",
    optional: true
},

Is there a way to make heirarchies of schemas so they can inherit from say an AbstractUserCreatedSchema?


#2

basic usage topic in the docs might be what you are looking for:
https://github.com/aldeed/meteor-simple-schema#combining-simpleschemas


#3

Yep, combinedSchema = new SimpleSchema([baseSchema, childSchema,...]) works for me :smile:! Thanks for that, maybe I should read past the first section of docs next timeā€¦