Using Foolproof RequiredIf on multiplecondition
问题 I have a dropdownlist named CustomerType with the the following values Id Name 1 Student 2 Non-Employed 3 Employed 4 SelfEmployed and I have one more property in my viewmodel public string CompanyAddress{ get; set; } My goal is to make CompanyAddress required if dropdownlist has values 3 or 4 I have tried the following but gets error Cannon have duplicate RequiredIf [RequiredIf("customerTypeID", 3, ErrorMessage = "Please enter company address")] [RequiredIf("customerTypeID", 4, ErrorMessage =