MVC 4 Integration

Dec 17, 2012 at 2:21 PM

Hello Jeremy,

Does FluentValidation integrate with MVC 4 as well as it does for MVC 3?

 

Thanks.

Coordinator
Dec 17, 2012 at 2:24 PM

Hi

FluentValidation supports the same integration points for MVC4 as it did for MVC3.  However, there is no support for WebAPI.

Jeremy

Jan 16, 2013 at 11:50 PM
Edited Jan 17, 2013 at 12:10 AM

Hello Jeremy,

I'm new with fluentvalidation and recently started work on this. Can you please describe how fluent work at client side in case of WebApi. 

Thanks.

Coordinator
Jan 17, 2013 at 3:38 PM

Hi 

FluentValidation doesn't currently have any support for WebAPI, although this is something I'm looking at adding this week. Please note though that there will only be *server side* integration for WebAPI.

Jeremy

May 29, 2013 at 10:37 AM
Dear Jeremy, thanks for your greate work! I Love it in MVC. Currenly I started a new project based on Web API. As you said in your last post, you planned to support it in WebApi. I want to know when we can see it? thanks in advance :)
Coordinator
May 29, 2013 at 10:41 AM
Hi

This isn't something that's going to happen at the moment I'm afraid.

I did spend some time looking into it, but don't have the time to implement anything further due to the complexity of getting this working. There were several pull requests that have been submitted that have attempted this, but none of them were complete and would still need a lot of work before they could be brought into FluentValidation.

I am also extremely unhappy with the duplication this would require - Microsoft's poor design decision to duplicate a huge amount of the codebase between WebApi and MVC have led to a very messy API which I'm not very happy supporting in FluentValidation's core.

Jeremy
Aug 8, 2013 at 12:55 AM
Jeremy,

Are you waiting for Microsoft to facilitate an easier path for code sharing between MVC and Api or is WebApi support as it is still a possibility?
Coordinator
Aug 8, 2013 at 7:20 AM
Hi

This is not something I'm planning on doing myself as I do not use webapi and as I mentioned above I am not happy with the poor design choices in MVC/webapi.

Personally I'd rather keep webapi support out of the core of FluentValidation (with hindsight, I wish I'd not included MVC support either)

That being said, if anyone would like to have a go at adding webapi support in a way that doesn't require a load of duplication, then please feel free and I will happily review it, but all the pull requests that have attempted this in the past have either not worked properly or have been rather incomplete.

Jeremy