Kendo Grid with Validation

Uses the Kendo Grid to showcase validation of two columns.

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2012.2.913/js/kendo.all.min.js"></script>
<div id="ResponseArea" style="display:none;"></div>
<br />
<div id="grid"></div>
<br />
<p>If KeyCode is B then a note is required.  I want on entering the "B" character in KeyCode for validation on Note to trigger so that it forces the user into the note field if it is empty asking them to enter in a note.</p>
<br />
<input type="button" id="ClearLog" value="Clear Log" style="float:right"/></p>
<b>LOG:</b>
<div id="log"></div>

JavaScript

// JavaScript
var data = [
    {
        ProductID: 1,
        ProductName: "Product Name 1",
        KeyCode: null,
        KeyDescription: null,
        CommentNote: null
    },
    {
        ProductID: 2,
        ProductName: "Product Name 2",
        KeyCode: null,
        KeyDescription: null,
        CommentNote: null
    },
    {
        ProductID: 3,
        ProductName: "Product Name 3",
        KeyCode: "A",
        KeyDescription: null,
        CommentNote: null
    },
    {
        ProductID: 4,
        ProductName: "Product Name 4",
        KeyCode: "B",
        KeyDescription: null,
        CommentNote: "Clear Out this Note to get Error Message."
    }
];

var codes = {  
    ValidCodes: {  
        A : "This is code A",
        B : "This is code B",
        C : "This is code C",
        D : "This is code D",
        E : "A normal E code"
    },
    GetDescription: function (code)
        {
            if(!this.Contains(code)){
                return "";
            }
            return this.ValidCodes[code];
        },
    Contains: function (keyCode)
    {
        for( key in this.ValidCodes ) {
            if (key == keyCode)
            {
                return true;
            }
        }
        return false;
    }
};

$("#grid").kendoGrid({
    dataSource: {
        data: data,
        schema: {
            model: {
                id: "ProductID",
                fields: {
                    ProductName: {
                        type: "string",
                        editable: false
                    },
                    KeyCode: {
                        type: "string",
                        editable: true,
                        validation: {
                               lengthCheck: function(input){
                                   if (input.attr("name") == "KeyCode"){
                                       input.attr("data-lengthCheck-msg", "Only 1 character allowed.");
                                       return...