Custom Data Annotation Validator Part I : Server Code

Posted by K. Scott Allen (OdeToCode.com) on February 23, 2011

Let's say you want to create a GreaterThan validation attribute and use it like so: public class Trip
{
[Required]
public DateTime StartDate { get; set; }

[Required]
[GreaterThan("StartDate")]
public DateTime EndDate { get; set; }
}


The implementation would look something like... [read more]

Rating

not rated

Reviews

There are currently no comments or reviews.

Submit a review:

Login required.