Skip to content

Commit

Permalink
feat(validate): validate asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kennedy committed May 25, 2016
1 parent 6a5acdf commit 1dea7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function(rules, onError, strict) {
properties: properties
};

let validation = inspector.validate(validationRules, this.request.body);
let validation = yield done => inspector.validate(validationRules, this.request.body, done);

if (!validation.valid) {
onError.call(this, validation.error);
Expand Down

0 comments on commit 1dea7d0

Please sign in to comment.