just started using ParlseyJS for some new work we are doing.
I am having an issue whereby I hide and disable a bunch of dropdown lists based on a dropdown value (in a form). When I submit this form, these fields continue to be validated. These fields are being disabled via jQuery as such:
minage.removeAttr('data-parsley-minagecheck').attr('data-parsley-excluded', '').attr('disabled', 'disabled');
maxage.removeAttr('data-parsley-maxagecheck').attr('data-parsley-excluded', '').attr('disabled', 'disabled');
xxx.removeAttr('data-parsley-xxxcheck').attr('data-parsley-excluded', '').attr('disabled', 'disabled');
yyy.removeAttr('data-parsley-yyycheck').attr('data-parsley-excluded', '').attr('disabled', 'disabled');
You will notice that I am also removing the custom validation checks and I am adding the excluded field to the attributes of the dropdown lists.
How can I stop them from being validated?
I updated my Parsley.js file to set ParsleyDefaults as such:
excluded: 'input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled]',