i am using validation jQuery plugin and its remote option for check whether user enters only Persian characters in a textbox . my code and php script work fine but my problem is remote option fires whenever user type a character in textbox while i want to do that only on blur(losses focus) on the text box . this is a part of my code:
$('#regForm').validate({
rules:{
name : {
required:true,
remote : {
url : 'check',
type: 'post'
}
}
},
messages:{
name : {
required : "this is Required",
remote : "Please enter Persian character "
}
}
});
what is solution?
If you don't want your fields to validate on keyup event, then you would have to use:
$('selector').validate({
onkeyup: false,
...
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With