In my application, the required fields border show in red color. I wrote the following css for required fields:
input[data-val-required], select[data-val-required] {
border: 1px solid #EFA4A4 !important;
}
select[data-val-required], select[data-val-required] {
border: 1px solid #EFA4A4 !important;
}
It was working fine for me. Then i need to use Select2 Drop down in the application. I add class select-two for those drop down which are required like this:
@Html.DropDownListFor(model => model.DocumentId, new SelectList(Model.Documents, "LRMISDocumentId", "DocumentName"), Resources.Select, new { id = "documents", Class = "select-two form-control" })
Then i implement select2 where select-two class is used. Now the problem is when i use select2 dropdown the red border disappears. What is the problem?