I am new to ASP.NET and MVC3. I have got a project where the MVC3 Validation Error Message needs to be shown in Tooltip without updating jquery.validate.unobtrusive.js. I have tried this
But could not get it to work. Here is the function the I should be using according to the link above. It says do something here...I could not figure out what code I should write to show the error message with a error icon beside the required field when validation fails.
$(function() {
var settngs = $.data($('form')[0], 'validator').settings;
var oldErrorFunction = settngs.errorPlacement;
var oldSucessFunction = settngs.success;
settngs.errorPlacement = function (error, inputElement) {
//Do something here
oldErrorFunction(error, inputElement);
}
settngs.success = function (error) {
//Do something here
oldSucessFunction(error);
}
});
Can anyone help?