Data Validation Annotations You Won't See In .NET 5.0

Thursday, February 10, 2011

I just heard today - the attributes demonstrated below didn't make the cut.

public class EditViewModel
{
    [GoodLooking]
    [NotATerrorist]
    public User CurrentUser { get; set; }  

    [ProperGrammer]
    [Profanity(ProfanityLevel.None)]
    public string Description { get; set; }
}

Comments
gravatar Rob Thursday, February 10, 2011
We can still add them in ourselves if we want them, right? Can't tell you how many times I've used [NotATerrorist]
gravatar Duncan Smart Thursday, February 10, 2011
Grammer? Or is there some meta-joke I'm missing :-)
gravatar Kim Tranjan Thursday, February 10, 2011
I LOL'D
sridhar Wednesday, March 2, 2011
Another attribute [WillMyCodeWork]

Comments are now closed.
by K. Scott Allen K.Scott Allen
My Pluralsight Courses
The Podcast!