How to remove Kendo mvc validator?

Total Post:61

Points:429
 3726  View(s)
Ratings:
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.
  1. Post:51

    Points:359
    Re: How to remove Kendo mvc validator?

    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.

      Modified On Apr-06-2018 12:53:44 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!