{"action":"created","issue":{"url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/179","labels_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/179/comments","events_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/179/events","html_url":"https://github.com/SBoudrias/Inquirer.js/issues/179","id":46610611,"number":179,"title":"validate does not run for list","user":{"login":"thaiat","id":4806944,"avatar_url":"https://avatars.githubusercontent.com/u/4806944?v=3","gravatar_id":"","url":"https://api.github.com/users/thaiat","html_url":"https://github.com/thaiat","followers_url":"https://api.github.com/users/thaiat/followers","following_url":"https://api.github.com/users/thaiat/following{/other_user}","gists_url":"https://api.github.com/users/thaiat/gists{/gist_id}","starred_url":"https://api.github.com/users/thaiat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaiat/subscriptions","organizations_url":"https://api.github.com/users/thaiat/orgs","repos_url":"https://api.github.com/users/thaiat/repos","events_url":"https://api.github.com/users/thaiat/events{/privacy}","received_events_url":"https://api.github.com/users/thaiat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-10-23T10:37:34Z","updated_at":"2015-12-03T19:51:25Z","closed_at":"2014-10-23T18:02:29Z","body":"Looks like validate fn never runs when defining a list.\r\n\r\nHere is a quick repro\r\n```js\r\nvar choices = _.range(3).map(function(index) {\r\n   return {\r\n      name: 'module' + index,\r\n      value: 'module' + index\r\n   };\r\n});\r\n\r\nvar prompts = [{\r\n   name: 'modulename',\r\n   type: 'list',\r\n   message: 'What is the name of your module ?',\r\n   choices: choices,\r\n   validate: function(value) {\r\n      return 'Not valid';\r\n   }\r\n}];\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/comments/161763259","html_url":"https://github.com/SBoudrias/Inquirer.js/issues/179#issuecomment-161763259","issue_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/179","id":161763259,"user":{"login":"SBoudrias","id":923865,"avatar_url":"https://avatars.githubusercontent.com/u/923865?v=3","gravatar_id":"","url":"https://api.github.com/users/SBoudrias","html_url":"https://github.com/SBoudrias","followers_url":"https://api.github.com/users/SBoudrias/followers","following_url":"https://api.github.com/users/SBoudrias/following{/other_user}","gists_url":"https://api.github.com/users/SBoudrias/gists{/gist_id}","starred_url":"https://api.github.com/users/SBoudrias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SBoudrias/subscriptions","organizations_url":"https://api.github.com/users/SBoudrias/orgs","repos_url":"https://api.github.com/users/SBoudrias/repos","events_url":"https://api.github.com/users/SBoudrias/events{/privacy}","received_events_url":"https://api.github.com/users/SBoudrias/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T19:51:25Z","updated_at":"2015-12-03T19:51:25Z","body":"@Amberlamps if you want to do an action on the selection of a choice, no need to hack around. Just do it in the callback function."}}