Skip to content

Commit

Permalink
Merge pull request #1106 from benedmunds/master
Browse files Browse the repository at this point in the history
Fixed reference to this.body.length in Post validation error when the body length is less than 10 characters
  • Loading branch information
tj committed Apr 25, 2012
2 parents 42aeab5 + d8caf20 commit 2a951e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/blog/models/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Post.prototype.validate = function(fn){
if (!this.body) return fn(new Error('body required'));
if (this.body.length < 10) {
return fn(new Error(
'body should be at least 10 characters long, was only ' + this.title.length));
'body should be at least 10 characters long, was only ' + this.body.length));
}
fn();
};
Expand Down

0 comments on commit 2a951e9

Please sign in to comment.