문제

With regard to the post here, how does one remove these errors once they've been shown and resolved?

I've added an error via:

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

But I can't get the errors to clear after an ajax post of the form.

도움이 되었습니까?

해결책

var validator = form.validate();
$('#SomeFormId').find('.field-validation-error span').each(function () {
    validator.settings.success($(this));
});
validator.resetForm();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top