I am using the following for a custom message for validation failure but I am getting the default message…What is wrong? or am I missing something? I get the default message …but not my custom message
$("#commentForm").validate({
rules: {
insurance1_ucBuildingInsurance_txtOtherReasonDescription: "required"
},
messages: {
insurance1_ucBuildingInsurance_txtOtherReasonDescription: { required: "Please enter a other reason........." }
}
})
Since you appear to be using ASP.Net from the naming convention, give this a try instead:
The validation plugin expects the name of an element, not the ID, so use
.UniqueIDrather than.ClientIDto get the control names here.