Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mde/model
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Oct 20, 2012
2 parents 0804d40 + c42b13f commit b4561b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/index.js
Expand Up @@ -645,11 +645,13 @@ utils.mixin(model, new (function () {
// contains an Object literal keyed by field name, and the
// error message for the first failed validation for that
// property
// Use raw, invalid value on the instance
if (validated.err) {
errs = errs || {};
errs[p] = validated.err;
item[p] = params[p];
}
// Otherwise add this property to the return item
// Otherwise add the type-coerced, valid value to the return item
else {
item[p] = validated.val;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -14,7 +14,7 @@
"mongo",
"mongodb"
],
"version": "0.0.12",
"version": "0.0.13",
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
"main": "./lib/index.js",
"scripts": {
Expand Down

0 comments on commit b4561b1

Please sign in to comment.