Closed GuillaumeExia closed 6 years ago
Please use this schemas:
const descriptionSchema = new Schema({
short_desc: {
type: String,
},
long_desc: {
type: String,
}
});
const schema = new Schema({
name: {
type: String,
},
firstname: {
type: String,
},
description: {
type: descriptionSchema,
},
birthdate: {
type: Date,
},
});
This error inform about key that is not defined in schema. I think you have some key in model that you dont have in schema.
Uncaught TypeError: t.messages.notDefinedKey
You can use third argument of schema contructor to disable not defined key validation.
const descriptionSchema = new Schema({
short_desc: {
type: String,
},
long_desc: {
type: String,
}
}, false, false);
const schema = new Schema({
name: {
type: String,
},
firstname: {
type: String,
},
description: {
type: descriptionSchema,
},
birthdate: {
type: Date,
},
}, false, false);
@GuillaumeExia could you check ?
Hello,
I'm encountering a problem with a form, let me explain:
My form structure looks like this:
So I have attached a schema which describes all my fields, and my main schema contains a nested schema (through and ObjectField). I tried to attach a model to my form but when I am submitting I get this error :
I can't find where this could come from, maybe you will have a clue to help me debug this?
Thanks.