check for at least 2 char sequence before whitespace in javascript / jQuery
<p>Well like the title says, how can i check it?
i have started something like this:</p>

<pre><code>    for (var i = 0; i &lt; elm.val().length; i++) {
        if (elmVal.charAt(i) !== '') {
            //do something
        }
    }
</code></pre>

<p>For example:</p>

<p>if the string is: "g  g  g" OR "gg g " it should be illegal.</p>
