Kendo Custom Validation Rules in a Data Grid

Why doesn't returning false in the custom rule display the error message?

by pehlizm

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.3.1324/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.3.1324/styles/kendo.silver.min.css">
<link rel="stylesheet" href="http://demos.telerik.com/kendo-ui/content/shared/styles/examples.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.3.1324/styles/kendo.rtl.min.css">
<script src="http://cdn.kendostatic.com/2013.3.1324/js/kendo.all.min.js"></script>
<div id="example" class="k-content">
    <div id="grid"></div>
</div>

JavaScript

var crudServiceBaseUrl = "http://demos.telerik.com/kendo-ui/service",
	    dataSource = new kendo.data.DataSource({
	        transport: {
	            read: {
	                url: crudServiceBaseUrl + "/Products",
	                dataType: "jsonp"
	            },
	            parameterMap: function (options, operation) {
	                if (operation !== "read" && options.models) {
	                    return {
	                        models: kendo.stringify(options.models)
	                    };
	                }
	            }
	        },
	        batch: true,
	        pageSize: 20,
	        schema: {
	            model: {
	                id: "ProductID",
	                fields: {
	                    ProductID: {
	                        editable: false,
	                        nullable: true
	                    },
	                   ProductName: {
     type: "string",
     validation: {
         custom: function(input) {
             // set the custom message
             input.attr("data-custom-msg", "Error");
 
              if (input.attr("name") == "ProductName") {
	                return  $.trim(input.val()) !== "";
	            }
         }
     }
 },
	                    UnitPrice: {
	                        type: "number",
	                        validation: {
	                            required: true,
	                            min: 1
	                        }
	                    }
	                }
	            }
	        }
	    });

	$("#grid").kendoGrid({
	    dataSource: dataSource,
	    pageable: true,
	    height: 430,
	    toolbar: ["create"],
	    columns: [{
	        field: "ProductName",
	        width: "150px"
	    }, {
	        field: "UnitPrice",
	        title: "Unit Price",
	        format: "{0:c}",
	        width: "100px"
	    }, ],
	    editable: {
	        mode: "incell",
	        update: true,
	        confirmation: "Are you sure?"
	    }
	});