Hi,
I'm trying to use custom validation and figured out that it works not in the same way as standard one.
When I use required validation the value is validated and it is impossible to change active cell.
In case of custom validation it is possible to change current active cell. And the validation message become hidden.
For me it is important to have custom validation with the same behavior as required.
I've added example http://jsfiddle.net/ax37h/4/.
I've added required validation for the first field and add 'specialDate' validation. So both validate but the way of validation is different.
I use HtmlHelper for kendo grid creation, so I need to add validation after initialization.
Validator as below:
Thank you.
I'm trying to use custom validation and figured out that it works not in the same way as standard one.
When I use required validation the value is validated and it is impossible to change active cell.
In case of custom validation it is possible to change current active cell. And the validation message become hidden.
For me it is important to have custom validation with the same behavior as required.
I've added example http://jsfiddle.net/ax37h/4/.
I've added required validation for the first field and add 'specialDate' validation. So both validate but the way of validation is different.
I use HtmlHelper for kendo grid creation, so I need to add validation after initialization.
Validator as below:
$(
'#grid'
).kendoValidator({
rules: {
specialDate:
function
(input) {
input.attr(
"data-specialDate-msg"
,
"The date should be 2013-01-02"
);
return
input.val() ==
'2013-01-02'
;
}
},
messages: {specialDate:
"The date should be 2013-01-02"
}
});
Thank you.