So Microsoft has a bug in that they do not allow you to show the validation summary message in client side validation mode when you tell it to exclude the property error detail messages in the Html.ValidationSummary(true,"Please enter the required fields below.") way.
I've seen people fix this using jquery validation and unobstructive, but not with the out of the box default MicrosoftMvcValidation.js.
So there were two problems:
The first was that passing true to ValidationSummary set the replaceValidationSummary parameter in the autogenerated window.mvcClientValidationMetadata.push statement. What they should have been doing instead is simply not initializing the validationSummaryULElement.
Ok... this isn't pretty, but it works. Simply load MicrosoftMvcValidation.js in your page and then execute the code below to dynamically patch the code.
$(function () { // this function fixes a bug. It allows the validation summary message to be shown clientside even when the "excludePropertyErrors" bool is set to true in Html.ValidationSummary var old_validate = Sys.Mvc.FormContext.prototype.validate;
Sys.Mvc.FormContext.prototype.validate = function () { if (this.replaceValidationSummary == false) { // only mess with this if it is turned off (MS bug) this.replaceValidationSummary = true; // this is for both the debug and non debug versions
this._validationSummaryULElement = null; // this is for the debug version
this.$8 = null; // this is for the non debug version (does the same thing as the line above)
}
return old_validate.apply(this);
}
});