there seems to be an issue with extend the custom validator and cross side scripting.Below my validation will return false as expected but It will still go down further into the Kendo.js source code and the alertbox will appear.Even if the textarea value in the textbox has been sanitised it will still contain the prior value.Why does it do this
qlValidation:
function
(input) {
if
(input.is(
"[name='q']"
)) {
var
sanitizedValue = InputContainsUnSanitizeHtml(input[0].value);
if
(sanitizedValue ===
true
) {
input.attr(
"data-qtml-msg"
,
"@(Strings.ValidQtml)"
);
var
a = $(
"#QtmlGrid"
).data().kendoGrid.dataSource.data();
input[0].value = sanitizedValue;
return
false
;
}
//var id = $("#Id").val();
////input[0].value = sanitizedValue;
//var grid = $("#QtmlGrid").data("kendoGrid");
//var previousName = grid.dataSource.get(id).Qtml;
//previousName = sanitizedValue;
//$("#QtmlGrid").data().kendoGrid.dataSource.filter().filters[0].value = name;
return
true
;
}
return
true
;
}