issue with validating form using jquery
<p>I am looping through all input text fields in form using jquery's each. There are total of 4 input fields. But I am getting following error</p>

<pre><code>Cannot call method 'toLowerCase' of undefined in jquery.js:2153
</code></pre>

<p>Here is my code</p>

<pre><code>loadViews: function (view, flag) {
            if( flag ) {
                if ( View.validate() ) {
                    $('.search').animate({left: '-350px'}, 100, 'easeInOutQuad', function () {
                        container.empty().load(view + '.html');
                    });
                } else {

                }
            } else {
                container.empty().load(view + '.html');
            }
        },
        validate: function () {
            $.each('#form input[type="text"]', function (i) {
                console.log($(this).val());
            });
            return false;
        }
</code></pre>

<p>What am I doing wrong?</p>
