I\'m trying to make the dropdown required if the #category field is empty.
Thanks!
JQUERY ATTEMPT #1:
$(\"#uploadDocsForm\").validate({
r
I appears that 'depends' is not supported anymore.
I used the following and it works:
Notice the option value="" which cause the validation to fail since val is empty
$("#uploadDocsForm").validate({
rules: {
name: {
required: true,
minlength: 2,
maxlength: 255
},
cat_id: {
required: true
}
}
},
messages: {
name: 'Please enter a Document Name.',
cat_id: 'Please select a Category.'
}
});