title: jquery validation in mvc 5 doesn't work
body: <pre><code>$(document).ready(function () {
              $("#submit").click(function () {
  
                  $(".error").hide();
                  var hasError = false;
  
                  var code = $("#code").val();
                  if (code == '') {
                      $("#code").after('&lt;span class="error"&gt;Enter code .&lt;/span&gt;');
                      hasError = true;
                  }
                  else if (code &lt;= 1) {
                      $("#code").after('&lt;span class="error"&gt;Enter at least 2 charecter.&lt;/span&gt;');
                      hasError = true;
                  }
  
                  if (hasError == true) { return false; }
  
              });
          });
  </code></pre>
  
  <p>For null check is working fine but the else if condition doesn't work and goes to the server site validation</p>