Compare validator

2 posts, 0 answers
  1. Michael
    Michael avatar
    8 posts
    Member since:
    Dec 2013

    Posted 30 Jun 2014 Link to this post

    Trouble getting compare validator working


    Have a grid (mvc, razor) with popup editing. 2
    password fields that should compare. On the model I’ve data annotated:


    How to get validation working?

    I have implemeted a solution found else where on your forum - it's working but not pretty:

    .Events(events => events.Error("grid_error"))

    function grid_error(e) {
    if (e.errors) {
    var message = "There are some errors:\n";
    // Create a message containing all errors.
                $.each(e.errors, function (key, value) {
                    if ('errors' in value) {
                        $.each(value.errors, function () {
                            message += this + "\n";
                // Display the message
                // Cancel the changes
                var grid = $("#grid").data("kendoGrid");
  2. Vladimir Iliev
    Vladimir Iliev avatar
    2156 posts

    Posted 02 Jul 2014 Link to this post

    Hi Michael,

    I would suggest to check the following forum post where my colleague Daniel already provided example solution for supporting this attribute:

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top