I have a field in my model that looks like this
[Display(Name = "CompanyType", ResourceType = typeof(Captions), AutoGenerateFilter = true)]
[Lookup(LookupTextField = "TypeForDisplay", LookupEntity = "Type", LookupColumns = new[] { "TypeForDisplay" }, LookupType = LookupType.DropDown)]
public Guid? TypeID{ get; set; }
I want to add Required to that property, but not in all casses. It depends on the value of another property in the model. What is the best(easiest) way to do this?