Consuming Web API Custom Validation in MVC using RestSharp

I previously wrote a post called Custom Validation in ASP.NET Web API with FluentValidation, in which I showed how my group set up a validation framework over WebAPI using the FluentValidation NuGet package. In this post, we'll go over how to consume those responses in an ASP.NET MVC app, as well as how to take the error messages from the API response and automatically add them to the MVC ModelState. I have updated the sample project on GitHub... Read more >

Custom Validation in ASP.NET Web API with FluentValidation

Validation is one of the key components in any web app. After all, we should never trust any input to our applications, ever. Up until now, my group has been building MVC-based web apps, in those apps we've been content to use built-in or custom-built validation solutions for any validation-type procedures we needed to write. Now, though, we've transferred over to building a web service written in ASP.NET Web API, and the old validation structure we had in place... Read more >

Use FluentValidation for a better validation framework in MVC

One of my team's favorite NuGet packages is FluentValidation, a package that allows us to extend the validation rules provided by System.ComponentModel to give us more flexible validation framework. In this post, we'll go over how to set up and use FluentValidation in a simple MVC web application. Let's get started! Getting the FluentValidation Package First things first, we need to grab FluentValidation from NuGet. Because we want to use it in an MVC project, we need the MVC... Read more >