2
所以显示猫鼬的错误,我已经在那里我想用户如何骨干意见
this.model.save(user_details, { // this is backbone model
error: function (model, errors) {
},
success: function (model, response) {
}
});
骨干示范urlRoot点保存到后台功能,其中
// here user is a Mongoose schema
user.save(function (err) {
if (err) {
res.send(err.errors);
}
});
我一个骨干视图我正在Mongoose模式中运行一些验证。
如果验证失败,我如何在主干视图上显示这些“err.errors”。 我可以看到在终端,如果我控制台登录错误,但不能发送他们回到意见。