Skip to content

Commit

Permalink
Fix Validation.creatFromMongoose
Browse files Browse the repository at this point in the history
  • Loading branch information
powmedia committed Feb 3, 2012
1 parent 27b3fe5 commit 6a91f82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion errors.js
Expand Up @@ -115,7 +115,9 @@ Validation.prototype.toJSON = function() {
Validation.createFromMongoose = function(err) {
var fields = {};

_.each(err.errors, function(item, key) {
Object.keys(err.errors).forEach(function(key) {
var item = err.errors[key];

fields[key] = item.type;
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Charles Davison <charlie@powmedia.co.uk>",
"name": "pow-express-utils",
"description": "Express utils",
"version": "0.1.5",
"version": "0.1.6",
"repository": {
"type": "git",
"url": "git://github.com/powmedia/pow-express-utils.git"
Expand Down

0 comments on commit 6a91f82

Please sign in to comment.