{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/1260","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/1260/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/1260/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/1260/events","html_url":"https://github.com/aspnet/Mvc/issues/1260","id":45093284,"number":1260,"title":"Validation design","user":{"login":"JeremySkinner","id":90130,"avatar_url":"https://avatars.githubusercontent.com/u/90130?v=3","gravatar_id":"","url":"https://api.github.com/users/JeremySkinner","html_url":"https://github.com/JeremySkinner","followers_url":"https://api.github.com/users/JeremySkinner/followers","following_url":"https://api.github.com/users/JeremySkinner/following{/other_user}","gists_url":"https://api.github.com/users/JeremySkinner/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremySkinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremySkinner/subscriptions","organizations_url":"https://api.github.com/users/JeremySkinner/orgs","repos_url":"https://api.github.com/users/JeremySkinner/repos","events_url":"https://api.github.com/users/JeremySkinner/events{/privacy}","received_events_url":"https://api.github.com/users/JeremySkinner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/1%20-%20Ready","name":"1 - Ready","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/Mvc/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/aspnet/Mvc/labels/needs%20design","name":"needs design","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/Mvc/milestones/14","html_url":"https://github.com/aspnet/Mvc/milestones/6.0.0-rc1","labels_url":"https://api.github.com/repos/aspnet/Mvc/milestones/14/labels","id":929400,"number":14,"title":"6.0.0-rc1","description":"","creator":{"login":"danroth27","id":1874516,"avatar_url":"https://avatars.githubusercontent.com/u/1874516?v=3","gravatar_id":"","url":"https://api.github.com/users/danroth27","html_url":"https://github.com/danroth27","followers_url":"https://api.github.com/users/danroth27/followers","following_url":"https://api.github.com/users/danroth27/following{/other_user}","gists_url":"https://api.github.com/users/danroth27/gists{/gist_id}","starred_url":"https://api.github.com/users/danroth27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danroth27/subscriptions","organizations_url":"https://api.github.com/users/danroth27/orgs","repos_url":"https://api.github.com/users/danroth27/repos","events_url":"https://api.github.com/users/danroth27/events{/privacy}","received_events_url":"https://api.github.com/users/danroth27/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":154,"state":"open","created_at":"2015-01-09T23:08:53Z","updated_at":"2015-03-17T00:40:10Z","due_on":"2015-03-23T07:00:00Z","closed_at":null},"comments":5,"created_at":"2014-10-07T10:49:09Z","updated_at":"2015-03-17T11:07:26Z","closed_at":null,"body":"Hi\r\n\r\nI'm the author of the FluentValidation library, and am looking at getting this to work with MVC6 with the help of @kanchanm \r\n\r\nHistorically, it's always been a pain to get FluentValidation to work with MVC's validation infrastructure:\r\n- MVC expects the validation provider to validate each value, and then if it passes the value is set on the property (as per the DataAnnotations validator)\r\n- FluentValidation works by setting all the properties first, and then validating the entire object in one go\r\n\r\nI've been able to get the two to work together with some messy hacks with previous versions of MVC (and to a lesser extent, WebAPI), but I was wondering if there are any plans to change this with vnext?\r\n\r\nSpecifically, I'd love to see a way for authors of validation libraries to take control of the *entire validation process* without having to create a custom model binder (with MVC5 and before, not all validation takes place in the model validator - some is still done by the binder).   "},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/82283679","html_url":"https://github.com/aspnet/Mvc/issues/1260#issuecomment-82283679","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/1260","id":82283679,"user":{"login":"JeremySkinner","id":90130,"avatar_url":"https://avatars.githubusercontent.com/u/90130?v=3","gravatar_id":"","url":"https://api.github.com/users/JeremySkinner","html_url":"https://github.com/JeremySkinner","followers_url":"https://api.github.com/users/JeremySkinner/followers","following_url":"https://api.github.com/users/JeremySkinner/following{/other_user}","gists_url":"https://api.github.com/users/JeremySkinner/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremySkinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremySkinner/subscriptions","organizations_url":"https://api.github.com/users/JeremySkinner/orgs","repos_url":"https://api.github.com/users/JeremySkinner/repos","events_url":"https://api.github.com/users/JeremySkinner/events{/privacy}","received_events_url":"https://api.github.com/users/JeremySkinner/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T11:07:26Z","updated_at":"2015-03-17T11:07:26Z","body":"This looks great - thanks for the detailed reply. A few questions...\r\n\r\n> There is also the capability for model-binding/formatters to add validation errors for missing values, which we will keep because once model-binding/de-serialization is over we can't tell the difference between an explicit-null and a value that wasn't provided.\r\n\r\nWill it be possible to globally take control of this process if the value wasn't provided, without having to implement a custom binder/formatter? This was probably the biggest pain when dealing with MVC integration in the past. \r\n\r\n> IObjectModelValidator is a replaceable service. If you swap it out, you're responsible for all validation other than what comes from the model-binders/formatters. If it's interesting to you we could factor this out into an abstract-visitor + implementation.\r\n\r\nI'll try and have a play with this to see whether being a visitor would make things easier - I'll let you know.\r\n\r\n> I don't like that client validation rules have to implement IModelValidator\r\n\r\nAgreed. Will the mechanism for registering new client-side rules be similar as with MVC5 and earlier? \r\n\r\nOnce I've had a play with it, I'll get back to you if there's anything else that I think would be useful. Thanks again for putting the work into this.\r\n"}}