I have syntax error in jQuery selector.I am add multiple rows using ajax and trying to validate it client side using validation.js..
In console, I see error
"SyntaxError: missing formal parameter".
$(document).ready(function(){
$( "#bookingadd" ).validate({
$('input[type=text]').each(function(){
$(this).rules( "add", "required");
});
$('select').each(function(){
$(this).rules( "add", "selectsubservices"); // value is not 0
});
submitHandler: function (){
setTimeout(function(){}, 2000);
jQuery("#bookingadd").submit();
}
});
});
Using this code I validate textbox and dropdown
I added console screen
