ではありません私は攘夷、VOGELSとNodeJSDynamoDBのはTypeErrorに攘夷エラーを修正する方法:child.schema._getLabelが機能
schema: {
email: Joi.string().email(),
item: Joi.array().items(Joi.object().keys({
a: Vogels.types.uuid(),
b: Joi.string(),
c: Joi.string(),
d: Joi.string().email()
}))
私は
var Obj = {
email: '[email protected]',
item: [{
b: 'data',
c: 'some-data',
d: '[email protected]'
}]
};
私は、次のエラー
errors.push(this.createError('object.child', { key, child: child.schema._getLabel(key), reason: result.errors }, localState, options));
TypeError: child.schema._getLabel is not a function
Model.create(Obj, function(err, data) {
if (err){
console.log(err);
return cb(err);
} else {
\t console.log(data);
\t return cb(null,data);
}
});
10誰かが私を助けたり説明したりすることができますか?なぜこのエラーが発生しているのですか?
コードの最初のスニペットで、スキーマの最後に括弧がありません。 –
@PatrickMotardスキーマのコードは表現目的のものにすぎませんでした –