Initialization of the Kendo validator in shared file
I am initializing my validator without rules from a shared file. I need to then add some rules for a separate file only when that file is used.
I need to add rules in a separate file that isn't shared
The following code needs to be added from the separate file
How can I merge these rules to the existing validator validation code when that files is included?
I am initializing my validator without rules from a shared file. I need to then add some rules for a separate file only when that file is used.
var
validatable = form.kendoValidator({
validateOnBlur:
false
}).data(
"kendoValidator"
);
I need to add rules in a separate file that isn't shared
The following code needs to be added from the separate file
{
rules: {
radio:
function
(input) {
if
(input.filter(
"[type=radio]"
) && input.attr(
"required"
)) {
return
$(
"form"
).find(
"[name="
+ input.attr(
"name"
) +
"]"
).is(
":checked"
);
}
return
true
;
}
},
messages: {
radio:
"Please select a status"
}
}
How can I merge these rules to the existing validator validation code when that files is included?