{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/8195","labels_url":"https://api.github.com/repos/laravel/framework/issues/8195/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/8195/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/8195/events","html_url":"https://github.com/laravel/framework/issues/8195","id":64763554,"number":8195,"title":"[L5] Validation method returns data that's not been validated","user":{"login":"garygreen","id":1702638,"avatar_url":"https://avatars.githubusercontent.com/u/1702638?v=3","gravatar_id":"","url":"https://api.github.com/users/garygreen","html_url":"https://github.com/garygreen","followers_url":"https://api.github.com/users/garygreen/followers","following_url":"https://api.github.com/users/garygreen/following{/other_user}","gists_url":"https://api.github.com/users/garygreen/gists{/gist_id}","starred_url":"https://api.github.com/users/garygreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garygreen/subscriptions","organizations_url":"https://api.github.com/users/garygreen/orgs","repos_url":"https://api.github.com/users/garygreen/repos","events_url":"https://api.github.com/users/garygreen/events{/privacy}","received_events_url":"https://api.github.com/users/garygreen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-27T13:38:03Z","updated_at":"2015-04-08T15:39:39Z","closed_at":null,"body":"```php\r\n$input = [\r\n\t'framework' => 'Laravel',\r\n\t'version' => '8.90',\r\n];\r\n\r\n$rules = [\r\n\t'framework' => 'required|string',\r\n];\r\n\r\n$validator = \\Validator::make($input, $rules);\r\n\r\ndd($validator->valid());\r\n```\r\n\r\nReturns\r\n\r\n```php\r\narray:2 [▼\r\n  \"framework\" => \"Laravel\"\r\n  \"version\" => \"8.90\"\r\n]\r\n```\r\n\r\nTechnically the 'version' hasn't been validated at all, so shouldn't form part of the valid data. Taylor, how do you feel about storing the rules which passed validation in `validate()` method and use that when plucking which data is valid?\r\n\r\nIt would be cool to use this method to pass the validated attributes / data straight onto your repository / eloquent. At the moment this method is kinda misleading?"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/90954745","html_url":"https://github.com/laravel/framework/issues/8195#issuecomment-90954745","issue_url":"https://api.github.com/repos/laravel/framework/issues/8195","id":90954745,"user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T15:39:39Z","updated_at":"2015-04-08T15:39:39Z","body":"@garygreen ask @taylorotwell"}}