Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:mde/model

  • Loading branch information...
commit b4561b176390804ed243cf7091b716d72dec1a6e 2 parents 0804d40 + c42b13f
mde authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 lib/index.js
  2. +1 −1  package.json
View
4 lib/index.js
@@ -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;
}
View
2  package.json
@@ -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": {
Please sign in to comment.
Something went wrong with that request. Please try again.