I have uploaded my code to js bin and got the following errors I am unsure how to fix them but I think its due to I am trying to use }, to pass in my id values.
Line 7: required: true; --- Expected '}' to match '{' from line 6 and instead saw ';'.
Line 10: required: true; --- Expected '}' to match '{' from line 9 and instead saw ';'.
Line 12: }, --- Expected an identifier and instead saw '}'.
Line 13: errorPlacement: function(error, element) { --- Expected ')' and instead saw ':'.
Line 13: errorPlacement: function(error, element) { --- Missing semicolon.
Line 13: errorPlacement: function(error, element) { --- Missing name in function declaration.
Line 21: }); --- Expected '(end)' and instead saw '}'.
jQuery(document).ready(function() {
//Home Validation
$("#quote").validate({
onfocusout:true,
rules:{
companyName:{
required: true;
},
companyAddress:{
required: true;
},
},
errorPlacement: function(error, element) {
if(element.is("textarea")) {
error.appendTo(".textareaError");
}else{
error.appendTo(".error");
}
}
});
});
I removed the semicolons on lines 7 and 10 and the comma on line 11.