const simplSchema = new SimpleSchema({
id: {type: String},
type: {type: String},
formField: {type: formFieldSchema},
orderKey: {type: Number, optional: true},
});
const formFieldSchema = new SimpleSchema({
id: {type: String},
type: {type: String},
label: {type: String, optional: true},
placeholder: {type: String, optional: true},
...
options: {type: formFieldOptionsSchema, optional: true},
});
const formFieldOptionsSchema = new SimpleSchema({
textStyle: {type: textOptionsSchema, optional: true},
button: {type: buttonOptionsSchema, optional: true},
number: {type: numberOptionsSchema, optional: true},
select: {type: selectOptionsSchema, optional: true},
});
etc.
When calling getObjectSchema('formField') on the upper schema, I receive this error:
What is this error, why is it thrown (it seems not correct) and how can I fix that? Am I doing sth wrong?