I have this condition in my validation:
consent: {
required: function(element) {
var age = getAge($("#birthdate").val());
if(age >= 18){
return false;
} else if(age >= 13 && age <=17 ){
$('#consent:checked');
} else {
//should show error message not ligible to register
}
}
}
how can return a message from above condition?