I have a drop down in a form which controls which fields will be enabled/disabled on the form using jQuery's .show() and .hide(). In my jquery.validate rules, I have all the fields as required.
This is what my jquery.validate rule looks like
$("#new_course").validate({
ignore: ":disabled",
rules: {
"course_init_on": {required: true},
"mins_before": {required: true},
.....
With the code, above it still validates the field that are hidden and stops the form from submitting.
What I can see is that you have added ignore ":disabled" which is different than ":hidden"
I think you should use:
$("#new_course").validate({
ignore: ":hidden",
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With