mongoose-ember-errors:将猫鼬验证错误转换为与余烬数据兼容的错误

时间:2021-05-26 06:05:00
【文件属性】:
文件名称:mongoose-ember-errors:将猫鼬验证错误转换为与余烬数据兼容的错误
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-26 06:05:00
JavaScript 猫鼬灰烬错误 将Mongoose的ValidationError转换为Ember-Data兼容的简单工具。 安装 npm install mongoose-ember-errors --save 用法 var EmberErrors = require ( 'mongoose-ember-errors' ) ; model . save ( function ( err ) { // err contains normal ValidationError err = new EmberErrors ( err ) ; } ) ; 转换看起来与此类似: { [ ValidationError : Schema validation failed ] message : 'Schema validation failed' , name : 'ValidationEr
【文件预览】:
mongoose-ember-errors-master
----package.json(840B)
----index.js(1KB)
----README.md(1KB)
----test()
--------index.js(1KB)

网友评论