{"action":"created","issue":{"url":"https://api.github.com/repos/ctavan/express-validator/issues/114","labels_url":"https://api.github.com/repos/ctavan/express-validator/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/ctavan/express-validator/issues/114/comments","events_url":"https://api.github.com/repos/ctavan/express-validator/issues/114/events","html_url":"https://github.com/ctavan/express-validator/issues/114","id":56498332,"number":114,"title":"has no method checkBody","user":{"login":"anbublacky","id":798103,"avatar_url":"https://avatars.githubusercontent.com/u/798103?v=3","gravatar_id":"","url":"https://api.github.com/users/anbublacky","html_url":"https://github.com/anbublacky","followers_url":"https://api.github.com/users/anbublacky/followers","following_url":"https://api.github.com/users/anbublacky/following{/other_user}","gists_url":"https://api.github.com/users/anbublacky/gists{/gist_id}","starred_url":"https://api.github.com/users/anbublacky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anbublacky/subscriptions","organizations_url":"https://api.github.com/users/anbublacky/orgs","repos_url":"https://api.github.com/users/anbublacky/repos","events_url":"https://api.github.com/users/anbublacky/events{/privacy}","received_events_url":"https://api.github.com/users/anbublacky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-04T09:09:06Z","updated_at":"2015-02-05T21:31:38Z","closed_at":null,"body":"I am using express 4.11.1 and express-validator 2.8.0.\r\n\r\nhere is the code i used above post action:\r\n\r\n    var util = require('util');\r\n    var express = require('express');\r\n    var bodyParser = require('body-parser');\r\n    var expressValidator = require('express-validator');\r\n    var app = express();\r\n\r\nand inside post action i gave\r\n\r\n  req.checkBody('postparam', 'Invalid postparam').notEmpty().isInt();\r\n\r\ni am getting has no method checkBody error, don know whether version is the problem so mentioned the versions above."},"comment":{"url":"https://api.github.com/repos/ctavan/express-validator/issues/comments/73133055","html_url":"https://github.com/ctavan/express-validator/issues/114#issuecomment-73133055","issue_url":"https://api.github.com/repos/ctavan/express-validator/issues/114","id":73133055,"user":{"login":"EyEdealist","id":3293629,"avatar_url":"https://avatars.githubusercontent.com/u/3293629?v=3","gravatar_id":"","url":"https://api.github.com/users/EyEdealist","html_url":"https://github.com/EyEdealist","followers_url":"https://api.github.com/users/EyEdealist/followers","following_url":"https://api.github.com/users/EyEdealist/following{/other_user}","gists_url":"https://api.github.com/users/EyEdealist/gists{/gist_id}","starred_url":"https://api.github.com/users/EyEdealist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EyEdealist/subscriptions","organizations_url":"https://api.github.com/users/EyEdealist/orgs","repos_url":"https://api.github.com/users/EyEdealist/repos","events_url":"https://api.github.com/users/EyEdealist/events{/privacy}","received_events_url":"https://api.github.com/users/EyEdealist/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T21:31:38Z","updated_at":"2015-02-05T21:31:38Z","body":"Looks like you forgot to register the bodyParser and expressValidator middleware with the app (which will add the validation methods to the request object).\r\n\r\nTry:\r\n```\r\nvar util = require('util');\r\nvar express = require('express');\r\nvar bodyParser = require('body-parser');\r\nvar expressValidator = require('express-validator');\r\nvar app = express();\r\n\r\n// parse application/x-www-form-urlencoded\r\napp.use(bodyParser.urlencoded({ extended: false }))\r\n\r\n// parse application/json\r\napp.use(bodyParser.json())\r\n\r\n// add validation methods to request\r\napp.use(expressValidator());\r\n\r\n// now the methods are available\r\napp.post('/', function(req, res, next) {\r\n    req.checkBody('postparam', 'Invalid postparam').notEmpty().isInt();\r\n});\r\n```\r\n"}}