{"action":"created","issue":{"url":"https://api.github.com/repos/ctavan/express-validator/issues/527","repository_url":"https://api.github.com/repos/ctavan/express-validator","labels_url":"https://api.github.com/repos/ctavan/express-validator/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/ctavan/express-validator/issues/527/comments","events_url":"https://api.github.com/repos/ctavan/express-validator/issues/527/events","html_url":"https://github.com/ctavan/express-validator/issues/527","id":297697567,"number":527,"title":"checkSchema - custom validator and exists errorMessage","user":{"login":"andrey-hohlov","id":7358151,"avatar_url":"https://avatars2.githubusercontent.com/u/7358151?v=4","gravatar_id":"","url":"https://api.github.com/users/andrey-hohlov","html_url":"https://github.com/andrey-hohlov","followers_url":"https://api.github.com/users/andrey-hohlov/followers","following_url":"https://api.github.com/users/andrey-hohlov/following{/other_user}","gists_url":"https://api.github.com/users/andrey-hohlov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-hohlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-hohlov/subscriptions","organizations_url":"https://api.github.com/users/andrey-hohlov/orgs","repos_url":"https://api.github.com/users/andrey-hohlov/repos","events_url":"https://api.github.com/users/andrey-hohlov/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-hohlov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-16T07:05:22Z","updated_at":"2018-02-17T12:36:00Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nI'm trying to use Schema Validation with 5.0.0.\r\n\r\n1. `custom` validator throw validation error `validatorCfg.validator is not a function` \r\n2. For `exists` param `errorMessage` ignored\r\n\r\n```javascript\r\ncheckSchema({\r\n  title: {\r\n    in: ['body'],\r\n    exists: {\r\n      errorMessage: 'title is required', // <- doesn't work\r\n    },\r\n    custom(value) { // <- doesn't work\r\n      console.log(value);\r\n      return true;\r\n    }\r\n  },\r\n  password: {\r\n    isLength: {\r\n      errorMessage: 'Password should be at least 7 chars long', // <- works\r\n    },\r\n  },\r\n});\r\n```\r\n\r\n`customValidators` param and all in this doc section https://github.com/ctavan/express-validator#legacy-api are deprecated...\r\n\r\nWhat am I doing wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/ctavan/express-validator/issues/comments/366438611","html_url":"https://github.com/ctavan/express-validator/issues/527#issuecomment-366438611","issue_url":"https://api.github.com/repos/ctavan/express-validator/issues/527","id":366438611,"user":{"login":"gustavohenke","id":826553,"avatar_url":"https://avatars2.githubusercontent.com/u/826553?v=4","gravatar_id":"","url":"https://api.github.com/users/gustavohenke","html_url":"https://github.com/gustavohenke","followers_url":"https://api.github.com/users/gustavohenke/followers","following_url":"https://api.github.com/users/gustavohenke/following{/other_user}","gists_url":"https://api.github.com/users/gustavohenke/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavohenke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavohenke/subscriptions","organizations_url":"https://api.github.com/users/gustavohenke/orgs","repos_url":"https://api.github.com/users/gustavohenke/repos","events_url":"https://api.github.com/users/gustavohenke/events{/privacy}","received_events_url":"https://api.github.com/users/gustavohenke/received_events","type":"User","site_admin":false},"created_at":"2018-02-17T12:36:00Z","updated_at":"2018-02-17T12:36:00Z","author_association":"COLLABORATOR","body":"If you don't use schema, then yes."}}
{"actor":{"display_login":"gustavohenke"}}