JQuery Validation on Bootstrap Accordion MVC
<p>As described in my heading, I am having a problem with the Validation on Fields that are in my Collapsed Accordion sections. I have found MANY questions around this, but none work for me, or I am not quite understanding how it all works, so even though this is to be viewed as a duplicate question, it is not as none of the others have helped.</p>

<p>I have 4 sections :</p>

<p><a href="https://i.stack.imgur.com/arDUU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/arDUU.jpg" alt="Accordion"></a></p>

<p>So when I click the create then the Project Name Specifies that it is missing, however NOT for any of the collapsed sections. </p>

<p>I have tried :</p>

<pre><code>$('#ticketForm').validate().settings.ignore = []
</code></pre>

<p>Which does not work. When I click create, then its as if the screen is doing a postback and anything I typed in is removed and returns to the first accordion section.</p>

<p>I have tried plenty other scripts that make no sense to me :( that others have said works, but I either get an error on a section that "does not exist", such as :</p>

<pre><code>$(document).ready(function() {
$("#accordion").accordion({
autoHeight: false,
navigation: true,
});    

$("#ticketForm").validate({
rules: {
    page_title: "required",
    seo_url: "required",
    AccordionField: {
        required: true
    }
},
ignore: [],
messages: {
    page_title: "Please enter a page title",
    seo_url: "Please enter a valid name"
}
 }); 
});
</code></pre>

<p>The error I get is that .accordion does not exist - or it does the same as I mentioned(Page does what looks like a postback etc etc.) </p>

<p>I have tried this as well, which give no error, but it doesnt work :</p>

<pre><code>   $(document).ready(function () {
            $('#ticketForm').validate({
                ignore: ":hidden"
            });
        });
</code></pre>

<p>I have tried placing <code>&lt;form id="ticketForm"&gt;</code> before and after my <code>@using (Html.BeginForm())</code>, thinking it might makea difference, but has no effect.</p>

<p>Please could someone help.</p>

<p>Thank you!</p>