Hello,
I downloaded the ExpressiveAnnotations and tried to implement it in my project. Having trouble getting it to work. The validation message didn't appear. Thank you for your help.
@Html.DropDownListFor(m => m.Search_Profile_Type, new List
{
new SelectListItem{ Text="ALL", Value = "ALL" },
new SelectListItem{ Text="Adjuster (Person)", Value = "ADJUSTER" },
new SelectListItem{ Text="Attorney (Person)", Value = "ATTORNEY" },
new SelectListItem{ Text="Carrier, Self-Insured Employer, Fund (Company)", Value = "CARRIER" },
new SelectListItem{ Text="Employer Contact Person (Person)", Value = "EMP_CONT" },
new SelectListItem{ Text="Employer (Company)", Value = "EMPLOYER" },
new SelectListItem{ Text="Injured Employee (Person)", Value = "IE" },
new SelectListItem{ Text="Other Contact Person (Person)", Value = "OTHERCONT" },
new SelectListItem{ Text="Other Company (Company)", Value = "OTHERCOMP" },
new SelectListItem{ Text="Rehab Provider Company (Company)", Value = "REHABCO" },
new SelectListItem{ Text="Rehab Provider Contact Person (Person)", Value = "RHC_CONT" },
new SelectListItem{ Text="Rehab Provider (Person)", Value = "QRP" },
new SelectListItem{ Text="Third Party Administrator (Company)", Value = "TPA" },
new SelectListItem{ Text="Vendor (School, Bookstore, Training Facility, etc.) (Company)", Value = "VENDOR" },
new SelectListItem{ Text="Vendor Contact Person (Person)", Value = "VEND_CONT" }}, new { @class = "form-control", @style = "max-width:400px;height:35px;resize:horizontal" })
Hello, I downloaded the ExpressiveAnnotations and tried to implement it in my project. Having trouble getting it to work. The validation message didn't appear. Thank you for your help.
Here is what I got:
[DisplayName("Company Name")] [RequiredIf("Search_Profile_Type == 'EMPLOYER'")]
public string Search_Company { get; set; }
@Html.ValidationSummary(true, "", new { @class = "text-danger" })