Custom Validation Attributes in ASP.NET MVC 3

Read full article  | No Comments

In this post I will show you how to write your own custom validation attributes. In the last post I wrote about using validation attributes to validate models in an ASP.NET MVC application. Maybe you will find yourself in a situation when you need something more specific than what is supported by the standard validation [...]

Read More

Validation with Data Annotations in ASP.NET MVC 3

Read full article  | No Comments

This post is about validation of models and viewmodels in ASP.NET MVC 3 framework using data annotations. For demonstration I will use a form to register information about a person. The form will contain fields for name, age, email and confirm email. I will describe how to implement validation for the data posted from the [...]

Read More