In jQuery, how do you select textbox that has a value of multiple spaces?
<p>I need to select such textboxes so as to validate required field. How do I go about doing it? Seems I can use a if statement, but I'm not sure how to implement.</p>

<p>I wrote the following required field validator to test for empty textboxes, but cannot detect textboxes with multiple spaces. Am I not doing validation the correct way? Should I be using a plugin for validation?</p>

<pre><code>function validate()
        {
            $('.LoginFormBodyRightColumn input:text[value!=""]').next('span[class*="RequiredValidator"]').hide();
            $('.LoginFormBodyRightColumn input:text[value=""]').next('span[class*="RequiredValidator"]').show();
            $('.LoginFormBodyRightColumn input:password[value!=""]').next('span[class*="RequiredValidator"]').hide();
            $('.LoginFormBodyRightColumn input:password[value=""]').next('span[class*="RequiredValidator"]').show();


        }
</code></pre>

<p>It seems to me a if statement has no place in jQuery, because in jQuery you select something and then perform something on the selector. A if statement involving selectors is meaningless.</p>
