Firefox 37.0.1 on Windows 7 Pro. jqGrid  4.4.1, cell editing mode. Two editable cells act differently on submit  and I can't figure out why. column1 element has maxValue passed as {{maximum_discount_value}}, and when I go over the limit it gives a pop-up with the error description mentioning max allowed value correctly. column2 element mas maxValue pointing to a function returning maxValue, and when I go over the limit it silently changes the value in the table to allowed maxValue about a second after I hit enter instead of giving me the same pop-up as I expect. What makes column2 to behave differently and how to make it to give me a pop-up?
Thanks.
$("#{{ grid_id }}").jqGrid({
        '{% trans "JQGRID_COLUMN1" %}',
        '{% trans "JQGRID_COLUMN2" %}',
    colModel:[
        {name : "column1", index : "some_index1",
            width : 25,
            sortable : false,
            classes : "editable",
            editable : true,
            edittype : "custom",
            editrules : {
                number : true,
                minValue : 0,
                maxValue : {{ maximum_discount_value }}
            },
            editoptions : {
                maxlength : 5,
                size : 5,
                custom_element: function_for_element,
                custom_value: function_for_value
            }
        {name : "column2", index : "some_index2",
            width : 25,
            sortable : false,
            classes : "editable",
            editable : true,
            edittype : "custom",
            editrules : {
                number : true,
                minValue : 0,
                maxValue : function_for_maximum_discount_value
            },
            editoptions : {
                maxlength : 5,
                size : 5,
                custom_element: function_for_element,
                custom_value: function_for_value
            }
            ]
function function_for_maximum_discount_value(elem) {
    maximum_discount_value=  $(elem).attr("maximum_discount_value");
    return maximum_discount_value;
}