Ben Foster 1/30/2013

Simple PATCH validation in ASP.NET Web API

Read Original

This technical article explains how to add custom validation logic for PATCH requests in ASP.NET Web API. It demonstrates using IValidatableObject to ensure at least one of two optional parameters (Position or MakeCoverImage) is provided, returning proper 400 errors, with code examples for the command model and controller.

Simple PATCH validation in ASP.NET Web API

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week