When form submission not accepted, dependent selector is messed up
<p>I have a page with a selector/drop-down menu that's dependent on another selector. In other words</p>

<p>-there is selector 1, which contains some number of categories, and selector 2, which contains some number of subcategories for each category in selector 1. </p>

<p>-when the page loads, selector 1 has its full range of categories available, and selector 2 has its full range of subcategories available.</p>

<p>-when a selection is made on selector 1, the number of available subcategories on selector 2 is narrowed down (as appropriate for the option selected on selector 1) through $('selector1').change(function(){ [... functionality implemented ...] });</p>

<p>The problem is that when a user submits the form, and the form is not accepted (i.e. contains errors in the fields, fields are not filled-in, etc.), since the 'change' functionality is not re-triggered, the full number of subcategories becomes available on selector 2, which makes it possible for a user, through mischief or accident, to select a subcategory which does not apply to the category selected on selector 1. Any recommendations on how to best deal with this issue? Thank you!</p>
