title: simple javascript validation in asp.net mvc
body: <p>I have very very stupid bug in javascript validation </p>
  
  <p>let me i explain in code :</p>
  
  <p>this is my form tag </p>
  
  <pre><code> &lt;form method="post" enctype="multipart/form-data" name="myForm" onsubmit="return validateForm()"&gt;
     &lt;textarea id="content"   name="Body"&gt;&lt;%= Model.Body %&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this is my script :</p>
  
  <pre><code> function validateForm(e) {
          debugger;
           var reviewMessage = $("[name='Body']").attr('value');
          //var overallValue = document.getElementsByClassName('checkbox overall icon-checkbox').prop.checked;
          if (reviewMessage.length &lt; 100) {
              e.preventDefault();
  
             // $("Body").show();
              $('#bodyValidation').css({'display' : 'block'});
              return false;
          }
          return true;
      }
  </code></pre>
  
  <p>my problem is that when ever i click the button page will be submited ;</p>
  
  <p>but i want to stop this action with javascript .</p>
  
  <p>how can i do that?</p>