ASP.NET MVC Manually remove unobtrusive validation error

As for the post here , how to remove these errors after they are displayed and resolved?

I added an error via:

var errorArray = {};
errorArray["Slug"] = 'Some error message for the Slug text box';
$('#SomeFormId').validate().showErrors(errorArray);

But I can not get errors to clear after form ajax post.

+4
source share
1 answer
var validator = form.validate();
$('#SomeFormId').find('.field-validation-error span').each(function () {
    validator.settings.success($(this));
});
validator.resetForm();
+7
source

All Articles