Home > DeveloperSection > Forums > How to remove Kendo mvc validator?
Brad Pitt
Brad Pitt

Total Post:61

Posted on    October-17-2014 1:08 AM


 1 Reply(s)
 3128  View(s)
Rate this:
A simple question, or so I thought. How to disable client side validation for kendo mvc grid? I thought there would be a property: "Enabled", "validator" or such which I could set to false but I can't find nothing.

Hugh Jackman
Hugh Jackman

Total Post:52

Posted on    October-17-2014 1:09 AM

You're correct in that there's no way to disable the validation via a property or options setting, however, you can work around it.

The validators for the grid cells are created internally by the grid. You can disable validation by replacing the functions of the validator object in the "edit" event of the grid, after it is created, i.e.:

edit: function (e) {
    // Always return valid
    e.sender.editable.validatable.validate = function () { return true; };
    e.sender.editable.validatable.validateInput = function(input) { return true; };
This should have the effect of disabling validation by always returning true.

Don't want to miss updates? Please click the below button!

Follow MindStick