I have a ViewModel for my MVC4 Prject containing two DateTime properties:
[Required] [DataType(DataType.Date)] public DateTime RentDate { get; set; } [Required]
Nothing like that exists in the framework. A common similar attribute is the RequiredIf. It is described in this post.
RequiredIf
RequiredIf Conditional Validation Attribute