GANI
GANI

Reputation: 2059

Clear Kendo Validator error messages

I have a form with multiple controls, the validation condition is set in the model using regular expressions, when the condition does't met the error messages shown beside the control. I have another button to clear the validation error messages. How to clear those messages

                     $("#student-details").kendoValidator();

Upvotes: 5

Views: 10378

Answers (1)

Lars Höppner
Lars Höppner

Reputation: 18402

Taken verbatim from the documentation:

// attach a validator to the container and get a reference
var validator = $("#myform").kendoValidator().data("kendoValidator");

//hide the validation messages when hide button is clicked
$("#hide").click(function() {
    validator.hideMessages();
});

Upvotes: 10

Related Questions