• errors () : Array
    Get the error messages if any.

    Example

    // get a reference to the validatable form
    var validatable = $("#myform").kendoValidator().data("kendoValidator");
    $("#save").click(function() {
        if (validatable.validate() === false) {
            // get the errors and write them out to the "errors" html container
            var errors = validatable.errors();
            $(errors).each(function() {
                $("#errors").html(this);
            });
        }
    });
    Returns
    Array Messages for the failed validation rules.
  • validate () : Boolean
    Validates the input element(s) against the declared validation rules.

    Example

    // get a reference to the validatable form
    var validatable = $("#myform").kendoValidator().data("kendoValidator");
    // check validation on save button click
    $("#save").click(function() {
        if (validatable.validate()) {
            save();
        }
    });
    Returns
    Boolean If all rules are passed successfully.
  • validateInput (input) : Boolean
    Validates the input element against the declared validation rules.

    Parameters

    input: Element
    Input element to be validated.
    Returns
    Boolean If all rules are passed successfully.