Validation - Part 3 - Server-Side
Posted by: Karl Seguin [MVP],
on 29 Apr 2009 |
View original | Bookmarked: 0 time(s)
So far we've built-up a small foundation for a custom validation framework in part 1, and then tied that to a jQuery plugin for our client-side validation in part 2. In this part we'll look at doing server-side validation. Of the three parts, this is the simplest.
Validator
Most of the heavy lifting takes place in our Validator class. Before looking at it, we'll make use of a simple ValidationError object to hold any errors:
public class ValidationError
{
public string Field { get;...