With my jquery validation configuration, I get the following error when setting onkeyup to true. It works if I set it to false, but I don\'t get validation feedback until I
How about extending onkeyup:
$('#signup-form').validate({
onkeyup: function(element) {
var element_id = $(element).attr('id');
if (this.settings.rules[element_id].onkeyup !== false) {
$(element).valid();
}
},
So now within rules you can do this:
rules: {
username: {
required: true,
minlength: 3,
maxlength: 25,
onkeyup: false, /* on blur validation */
},
password: {
required: true,
passwordmeter: true,
onkeyup: true, /* on keyup validation */
},
By extending onkeyup we made it a default behaviour, so sticking onkeyup: true
is optional.