{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/4035","repository_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate","labels_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/4035/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/4035/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/4035/events","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4035","id":383252452,"node_id":"MDU6SXNzdWUzODMyNTI0NTI=","number":4035,"title":"Custom Validation with MVC","user":{"login":"rahulbpatel","id":1158576,"node_id":"MDQ6VXNlcjExNTg1NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1158576?v=4","gravatar_id":"","url":"https://api.github.com/users/rahulbpatel","html_url":"https://github.com/rahulbpatel","followers_url":"https://api.github.com/users/rahulbpatel/followers","following_url":"https://api.github.com/users/rahulbpatel/following{/other_user}","gists_url":"https://api.github.com/users/rahulbpatel/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulbpatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulbpatel/subscriptions","organizations_url":"https://api.github.com/users/rahulbpatel/orgs","repos_url":"https://api.github.com/users/rahulbpatel/repos","events_url":"https://api.github.com/users/rahulbpatel/events{/privacy}","received_events_url":"https://api.github.com/users/rahulbpatel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-21T18:52:34Z","updated_at":"2018-11-26T23:48:26Z","closed_at":null,"author_association":"NONE","body":"I am trying to implement custom validation via the `ICustomValidation` interface on my DTO but when the controller action is invoked we get this exception:\r\n\r\n```\r\n[AbpValidationException: Method arguments are not valid! See ValidationErrors for details.]\r\n   Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate() in \r\n```\r\n\r\nI realize now this is expected behavior.  However, what I want is  to be able to display custom validation errors my view.  I am using traditional ASP.NET MVC 5 view, not Angular/API setup.  \r\n\r\nWhat is the pattern to do this?"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/comments/441844018","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4035#issuecomment-441844018","issue_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/4035","id":441844018,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTg0NDAxOA==","user":{"login":"natiki","id":4738140,"node_id":"MDQ6VXNlcjQ3MzgxNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4738140?v=4","gravatar_id":"","url":"https://api.github.com/users/natiki","html_url":"https://github.com/natiki","followers_url":"https://api.github.com/users/natiki/followers","following_url":"https://api.github.com/users/natiki/following{/other_user}","gists_url":"https://api.github.com/users/natiki/gists{/gist_id}","starred_url":"https://api.github.com/users/natiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natiki/subscriptions","organizations_url":"https://api.github.com/users/natiki/orgs","repos_url":"https://api.github.com/users/natiki/repos","events_url":"https://api.github.com/users/natiki/events{/privacy}","received_events_url":"https://api.github.com/users/natiki/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T23:48:26Z","updated_at":"2018-11-26T23:48:26Z","author_association":"CONTRIBUTOR","body":"Hi @rahulbpatel,\r\n\r\nThe framework also allows you to turn off its approach to validation by adding the following. I had a quick look on https://aspnetboilerplate.com/Pages/Documents/MVC-Controllers#validation and it is not \r\n(@hikalkan) expressly mentioned. So it may be worth getting the documentation updated.\r\n\r\n```c#\r\n        public override void PreInitialize()\r\n        {\r\n                //Don't use validation filter. Rather use standard Model.IsValid()\r\n               Configuration.Modules.AbpMvc().IsValidationEnabledForControllers = false; \r\n        }\r\n```"}}
{"actor":{"display_login":"natiki"}}