I am creating a sample book library application using asp.net MVC in which i am using kendo UI tools, i want use Book title or author fields in which i want to prevent a user from entering numerical values, allowing only A-Z, how will i use kendoValidator to do that. below is my input
<input id="txtTitle" name="txtTitle" type="text" class="k-textbox" value="#= Title #" />
This is where i want to do the validation
return $("#bookDiv").kendoValidator({
rules: {
Title: function (input) {
if (input.is("[name=txtTitle]") && input.val() == ""))
return false;
else
return true;
}});
Rather than creating a custom rule, you could use Kendo UI's built in pattern validator.
Kendo UI API Reference