How to use Kendo Validator / Kendo Validation

For example, I have form which has Salary as input field, now I would like to perform custom validation on this field.


<div id="DataEntryDiv" style="margin-top:20px">
<div class="editor-label">Salary</div>
<div class="editor-field">
<input id="Salary" type="number" class="input" name="Salary" data-bind="value: Salary" />


<script type="text/javascript">
var myValidator = $("#DataEntryDiv").kendoValidator({

rules: {
SalaryRule: function (input) {
if ("[name=Salary]")) {
return !(parseInt($("#Salary").val()) <= 0);
return true;
messages: {
SalaryRule: "Value must be greater than 0",
validateOnBlur: false

function onSave(e) {
if (!myValidator.validate()) {

This works with Kendo Grid Pop as well. All you have to do is hook up the save event for kend Grid


.Events(e => e.Save("onSave"))

Happy Kooding… Hope this helps!