Unable to get jquery.validation working in my ASP.NET Core MVC6 project
<p>I thought I would have this working from a <a href="https://stackoverflow.com/questions/36567145/jquery-valildator-not-working">post</a> that gave me the actual answer. it works in <a href="https://jsfiddle.net/si2030/6sc1u7rq/1/" rel="nofollow noreferrer">JSfiddle</a> as it did in the previous post however I cannot get it to work in the project. I think the code is right it's just not validating the textbox on submit.</p>

<p>This is the markup for page:</p>

<pre><code>&lt;form action="/CompanyDetails/Edit" method="post"&gt;
  &lt;div class="form-horizontal"&gt;
    &lt;h4&gt;CompanyDetailsViewModel&lt;/h4&gt;
    &lt;hr /&gt;
    &lt;div class="text-danger validation-summary-errors"&gt;
      &lt;ul&gt;
        &lt;li style="display:none"&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;input type="hidden" data-val="true" data-val-required="The CompanyDetailsId field is required." id="CompanyDetailsId" name="CompanyDetailsId" value="1" /&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="col-md-2 control-label" for="ABN"&gt;ABN:&lt;/label&gt;
      &lt;div class="col-md-10"&gt;
        &lt;input type="text" name="ABN" id="ABN" class="form-control" /&gt;
        &lt;span class="text-danger field-validation-error" data-valmsg-for="ABN" data-valmsg-replace="true" /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
</code></pre>

<p>The form button:</p>

<pre><code>&lt;div class="form-group"&gt;
  &lt;div class="col-md-offset-2 col-md-10"&gt;
    &lt;input type="submit" value="Save" class="btn btn-default" /&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>The form renders but when I click on save instead of it showing an error it just goes back to the controller however the ModelState is false.</p>

<p>I have set breakpoints on the actual validate script via Firefox but it doesn't even fire.</p>

<p><em>Why is the validate script not working in the asp.net page while its working in JSFiddle</em>?</p>