If you want to hide validation error messages, than you should use resetForm function instead of hideErrors function. As other mentioned in their answers, resetForm internally call hideErrors function.
But here's the twist comes, when you will try to use resetForm function it will not work because of the way jquery.validate.unobtrusive plugin works.
jquery.validate.unobtrusive plugin override the errorClass and errorElement property of jquery.validate plugin.
From jquery.validate.unobtrusive plugin code Line-109
....
if (!result) {
result = {
options: {
errorClass: "input-validation-error",
errorElement: "span",
errorPlacement: $.proxy(onError, form),
...
So when you will call resetForm function on validator's object, jquery.validate plugin can't find error labels to remove so validation error message will not remove.
Now you have two options to remove error messages:
Option - 1
You can edit jquery.validate.unobtrusive plugin code and replace errorClass and errorElement values with the following values:
errorClass: "error",
errorElement: "label",
These are the default values which jquery.validate plugin use.
Option - 2
You can write your own code which will do the trick and by this way you do not have to modify the plugin code. Here is the code which you can use with little modifications mentioned below:
// get the form
var form = $("#formId");
// get validator object
var validator = form.validate();
// get errors that were created using jQuery.validate.unobtrusive
var errors = form.find(".field-validation-error span");
// trick unobtrusive to think the elements were succesfully validated
// this removes the validation messages
errors.each(function () { validator.settings.success($(this)); })
//this is optional, only needed if you defined
//custom unhighlight function
if (validator.settings.unhighlight) {
for (i = 0, elements = validator.invalidElements() ; elements[i]; i++) {
validator.settings.unhighlight.call(validator, elements[i], validator.settings.errorClass, validator.settings.validClass);
}
}