title: Setting min length in input text is giving repetitive alert message
body: <p>I want a user to add minimum 10 characters into the html <code>text</code>. So for that I have set a validation on <code>onblur</code> of the textbox. Below is the html and its JS code</p>
  <p><strong>HTML</strong></p>
  <pre><code>&lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;txtStoreSiteAsstMangrMob&quot;  maxlength=&quot;10&quot; onblur=&quot;checkLength(this)&quot;  onkeypress=&quot;return IsNumeric4(event);&quot; ondrop=&quot;return false;&quot; onpaste=&quot;return false;&quot; /&gt;
  </code></pre>
  <p><strong>JavaScript</strong></p>
  <pre><code>function checkLength(el) {    
  if (el.value.length != 10) {
      alert(&quot;Minimum 10 numbers are accepted&quot;);        
  }  }
  </code></pre>
  <p>The problem here is that the validation is firing properly but the message is showing repetitively, even after clicking OK also.</p>
  <p>So why is it happening like this?</p>