Skip to content

Commit

Permalink
Closes #1400
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Feb 8, 2014
1 parent c1991e8 commit 85b7a73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ internals.input = function (source, key, request, next) {
}
}

request.log(['hapi', 'validation', 'error', source], error);

// Log only

if (request.route.validate.failAction === 'log') {
request.log(['hapi', 'validation', 'error', source], error);
return next();
}

Expand Down
6 changes: 4 additions & 2 deletions test/unit/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ describe('Validation', function () {
route: routeClone.config,
server: {
settings: {}
}
},
log: function () { }
};
};

Expand All @@ -73,7 +74,8 @@ describe('Validation', function () {
route: routeClone.config,
server: {
settings: {}
}
},
log: function () { }
};
};

Expand Down

0 comments on commit 85b7a73

Please sign in to comment.