[jQuery] jqTransform + validate bassistance plugin
Hi, i've a problem with input radio validation.
I've two radio (accept and don't accept) for the privacy and obviously the users have to click "accept".
Here my code:
$("#formContactPage").validate({
errorLabelContainer: $("p.error"),
rules: {
denominazione: "required",
cognome: "required",
jtitle: "required",
comune: "required",
tel: "required",
email: {
required: true,
email: true
},
check_informativa: {
required: true
}
},
messages: {
denominazione: "Il campo denominazione è obbligatorio<br />",
cognome: "Il campo cognome è obbligatorio<br />",
jtitle: "Il campo job title è obbligatorio<br />",
comune: "Il campo comune è obbligatorio<br />",
tel: "Il campo telefono è obbligatorio<br />",
email: "Il campo email non è corretto<br />",
check_informativa: "Prima di procedere occorre accettare il consenso al trattamento dei dati personali<br />"
}
});
<form action="<?php echo $_SERVER['PHP_SELF'];?>" id="formContactPage" method="post">
...
...
....
<input type="radio" name="check_informativa" id="check_informativa_no" value="no"> <label for="check_informativa_no">Non accetto</label>
<input type="radio" name="check_informativa" id="check_informativa_si" value="si"> <label for="check_informativa_si">Accetto</label>
</form>
ale