Created
March 20, 2013 15:03
-
-
Save JustinMason/5205378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomePageViewModel | |
{ | |
[Display(Order=0, Name="Full Name")] | |
[Required(ErrorMessage="Full Name is Required")] | |
public string Name { get; set; } | |
[Display(Order=1, Name="Birthday") ] | |
[DateComparer(MaxDateAddDaysFromNow=0, MinDateSelector="PropertyDate")] | |
//Must be less than Now and Greater than the sibling property PropertyDate | |
public DateTime BirthDate { get; set; } | |
[HiddenInput(DisplayValue=false)] | |
public string PropertyDate { | |
get { return new DateTime(2013, 1, 1).ToString("G"); } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment