As we know jQuery validate plugin invalidates Select field when it has blank value. Why don't we set its value to blank when required.
Yes, you can validate select field with some predefined value.
$("#everything").validate({
rules: {
select_field:{
required: {
depends: function(element){
if('none' == $('#select_field').val()){
//Set predefined value to blank.
$('#select_field').val('');
}
return true;
}
}
}
}
});
We can set blank value for select field but in some case we can't. For Ex: using a function that generates Dropdown field for you and you don't have control over it.
I hope it helps as it helps me.