Custom validators aren't reusable because they must filter by a jquery selector. It is also inefficient to run the validator on every input field. Seems like it would be better to extend Observable:
<
input
data-bind
=
"validator: myValidator"
>
Another option is to pass the selector to a validation factory as in:
$("...").kendoValidator({
rules: {
x: xValidator("[name=...]")
}
});
function xValidator(selector) {
return function(input) {
return input.is(selector) && ...;
}
}