Kendo UI v2011.3.1129
Hello, I'm trying to attach some custom validation for a text input and having some difficulty. The rule is that the text field must contain at least one non-whitespace character. I've tried a dozen different permutations of the snippet below, but it doesn't seem to work quite as expected.
roleEditObject.formValidator = $("#roleEditorForm").kendoValidator(
{
rules:
{
custom: function(input)
{
return input.is("[name=name]") && input.val().match(/^\S+$/);
}
}
}).kendoValidator().data("kendoValidator");
I'm assuming input.is("[name=name]") selects an input with a name attribute equal to 'name'
Any help would be appreciated, thanks.
Hello, I'm trying to attach some custom validation for a text input and having some difficulty. The rule is that the text field must contain at least one non-whitespace character. I've tried a dozen different permutations of the snippet below, but it doesn't seem to work quite as expected.
roleEditObject.formValidator = $("#roleEditorForm").kendoValidator(
{
rules:
{
custom: function(input)
{
return input.is("[name=name]") && input.val().match(/^\S+$/);
}
}
}).kendoValidator().data("kendoValidator");
I'm assuming input.is("[name=name]") selects an input with a name attribute equal to 'name'
Any help would be appreciated, thanks.