rules: {
firstname: "required",
lastname: "required",
birthdate: {
date: true,
required: true,
minimumAge: true
},
consent: {
required: function(element) {
return getAge($("#birthdate").val()) < 18;
$("#consent").show();
}
}
});
$("#consent").hide();
I want to show a check box for consent if the age of the user is below 18, From the above code why isn't working?