The validation is working good, but does not display the error message in the grid cell.
I have tried couple of options, even though it enters into the logic and fails the validation, no message is displayed.
$.extend(true, kendo.ui.validator, {
rules: {
// custom rules
OrgSchoolID: function (input) {
//console.log("Custom Validator fired");
// all of the input must have a value
//return $.trim(input.val()) !== "";
if (input.is("[name=OrgID_FK]") && input.val() === "")
return false;
else
return true;
},
},
messages: { //custom rules messages
OrgSchoolID: function (input) {
// return the message text
return "OrgName is required!";
}
}
});
===============================================================================================================================
I tried this options as well, even though it steps into correctly during debug and returns fail, the Error message is not displayed
OrgID_FK: {
editable: true,
type: "number",
validation: {
IsOrgIDValid: function (input) {
console.log("Validation fired for ORgID Column");
if (input.is("[name=OrgID_FK]") && input.val() === "") {
console.log("Validation failed for OrgID_FK");
input.attr("data-IsOrgIDValid-msg", "OrgName is required!");
return false;
}
return true;
}
} // validation
}, // OrgID_FK
I have tried couple of options, even though it enters into the logic and fails the validation, no message is displayed.
$.extend(true, kendo.ui.validator, {
rules: {
// custom rules
OrgSchoolID: function (input) {
//console.log("Custom Validator fired");
// all of the input must have a value
//return $.trim(input.val()) !== "";
if (input.is("[name=OrgID_FK]") && input.val() === "")
return false;
else
return true;
},
},
messages: { //custom rules messages
OrgSchoolID: function (input) {
// return the message text
return "OrgName is required!";
}
}
});
===============================================================================================================================
I tried this options as well, even though it steps into correctly during debug and returns fail, the Error message is not displayed
OrgID_FK: {
editable: true,
type: "number",
validation: {
IsOrgIDValid: function (input) {
console.log("Validation fired for ORgID Column");
if (input.is("[name=OrgID_FK]") && input.val() === "") {
console.log("Validation failed for OrgID_FK");
input.attr("data-IsOrgIDValid-msg", "OrgName is required!");
return false;
}
return true;
}
} // validation
}, // OrgID_FK