Helping you solve those tough coding problems!
Learn some great web development and web design tips and techniques through recipes that clearly define the problem being solved with a working solution.
Popular Tags: cakephp | theory | optimization | javascript-development | asp-net | css | jquery-development | sql | ajax | c

Search:
Follow @endyourif rss Facebook LinkedIn

Unit Testing Data Validation with MVC Unit Testing Data Validation with MVC

Published on May 11, 2015 by Jamie Munro

You've added some data validation and you want to test it out in action. The data validation can be standard data annotations, custom data attributes, or data validation implemented via an IValidatableObject. This article will explore how to leverage the ValidationContext to execute and assert the test results.

Read more >

Tags: validation | ASP.NET | mvc | Testing | unit testing | ivalidatableobject | validationcontext

Removing Data Validation from MVC Controllers Removing Data Validation from MVC Controllers

Published on May 6, 2015 by Jamie Munro

You require custom data validation that cannot be accomplished via the built-in data annotation validation attributes - or - your data validation requires access to multiple properties in your model. Let's explore how to leverage the IValidatableObject.

Read more >

Tags: validation | ASP.NET | mvc5 | ivalidatableobject | validationcontext