Conditional validation for other attributes, such as MaxLength?

Dec 17, 2014 at 3:04 PM
RequiredIf is great. But is it possible to extend the conditional functionality it provides to other data validation attributes, such as MaxLength? E.g. something like:
[Display(Name = "Name")]
[RequiredIfNot("Deleted", false, ErrorMessage = "Please enter a Name")]
[MaxLengthIfNot("Deleted", false, 100, ErrorMessage = "Maximum length is 100 characters")]
public string Name { get; set; }