character count not working right for validate.js
<p>Wonder if this is doable. I am setting a validator for a form like this</p>

<pre><code>function addFormRules(selector,rules) {
        $form.find(selector).each(function() {
            $(this).rules('add', rules);
        });
    }
</code></pre>

<p>and add the rules like this. The $form is a global variable which returns a form</p>

<pre><code>addFormRules('textarea[id*="contactus_comment"]' , {
        required: false,
        rangelength: [2, 5000],
        messages: {
            //required: msg.VALIDATE_CONTACTUSMINLENGTH,
            rangelength: function(range, input) {
                return [
                    range[1] - $(input).val().length,
                    ' characters remaining'                                
                ].join('');

            }

        }
    });
</code></pre>

<p>The intention is to show how many characters left before I hit the max limit. Which seems to stop working right after I pass the range[0]...And it also doesnt let me submit my form until the character count doesnt reach the max limit. The form should not be blocked from being submitted if it doesnt reach the max character range. If it exceeds yes then I understand</p>