I have a Model with a couple of properties and I implemented Darin's answer from my previous question: ASP.NET MVC: Custom Validation by DataAnnotation. This enabled me to validate 4 properties at once (because I needed them together not to exceed a certain length).
The problem is, when I Annonate only 1 of the 4 properties with this custom validator, only that textbox's backgroundcolor will turn red when validation failed. When I annonate all 4 properties all 4 textboxes will turn red, but the error message will be displayed 4 times. Which is ugly. So I set @Html.ValidationSummary(false) so the error messages go in the summary, but all 4 error messages will be summarized (which is logical).
How can I make sure the error message will be displayed only once, while having all 4 textboxes turn red?
Thanks in advance for helping this MVC noob. Appreciate it.