I have a <textare> in my jsp and I want to add validator on that.
But it is not getting triggered for any action. I tried ‘change blur valueChanged keyup’ etc
<div class="span2">
<textarea rows="4" cols="250" id="note"></textarea>
</div>
and the validator code is
$('#form').jqxValidator(
{ rules : [ {input: '#note', message: 'Maximum characters allowed are 255.', action: 'blur',
rule: function (input, commit) {
if(input.val().trim().length > 255) {
return false;
}
return true;
}
}
],
scroll : false,
theme : theme
});
Please let me know if I am missing something here.