Hello,
A question about validation in kendo UI datasource.
I have a kendo grid and this grid has defined an editor template which is a custom directive 'tagSearch'. This custom directive has an input element into it with type text:
editor: function (container, options) {
var tagSelection = $('<div name="' + options.field + '"><tag-search></tag-search></div>');
tagSelection.appendTo(container);
}
In validation method I have the following code (into dataSource):
schema: {
model: {
id: "itemId",
fields: {
tag: {
type: "string",
validation: {
required: true,
tagvalidation: function (input) {
if (input.is("[type=text]")) {
if(...some validation...){
input.attr("data-tagvalidation-msg", "This tag is already added!");
return false;
}
return true;
}
}
}
}
}
}
But the validation message with the text "This tag is already added!" does not appear. So what could be the possible reason(s) for this issue
Thanks and Regards!