How to minimize these parameters
<pre><code>(function ($) {
    var LOWER = /[a-z]/,
        UPPER = /[A-Z]/,
        DIGIT = /[0-9]/,
        DIGITS = /[0-9].*[0-9]/,
        SPECIAL = /[^a-zA-Z0-9]/,
        SAME = /^(.)\1+$/;

    function rating(rate, message) {
        return {
            rate: rate,
            messageKey: message
        };
    }

    function uncapitalize(str) {
        return str.substring(0, 1).toLowerCase() + str.substring(1);
    }

    $.validator.passwordRating = function (password, username) {

        if (!password || password.length &lt; 5) return rating(0, "too-short");

        if (username &amp;&amp; password.toLowerCase().match(username.toLowerCase())) return rating(0, "similar-to-username");

        if (SAME.test(password)) return rating(1, "very-weak");

        var lower = LOWER.test(password),
            upper = UPPER.test(uncapitalize(password)),
            digit = DIGIT.test(password),
            digits = DIGITS.test(password),
            special = SPECIAL.test(password);


        if (lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; password.length &gt; 19 || 
            lower &amp;&amp; upper &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 ||
            lower &amp;&amp; special &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 ||
            lower &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 19 || 
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; upper &amp;&amp; password.length &gt; 19 || 
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; special &amp;&amp; password.length &gt; 19 ||

            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; lower &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; special &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; special &amp;&amp; password.length &gt; 19 ||

            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; special &amp;&amp; password.length &gt; 19 || 
            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; special &amp;&amp; upper &amp;&amp; password.length &gt; 19 || 
            digit &amp;&amp; digits &amp;&amp; special &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 19 || 
            digit &amp;&amp; digits &amp;&amp; special &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; special &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; special &amp;&amp; password.length &gt; 19 ||


            special &amp;&amp; lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 || 
            special &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 19 ||
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 19 ||
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            special &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 19 || 
            special &amp;&amp; upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 19 || 
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; special &amp;&amp; password.length &gt; 19 ) { 
               return rating(5, "very-strong");
           }

        if (lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; password.length &gt; 8 ||
            lower &amp;&amp; upper &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 ||
            lower &amp;&amp; special &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 ||
            lower &amp;&amp; special &amp;&amp; digits &amp;&amp; digit &amp;&amp; upper &amp;&amp; password.length &gt; 8 ||
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; upper &amp;&amp; password.length &gt; 8 || 
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; special &amp;&amp; password.length &gt; 8 ||

            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; password.length &gt; 8 ||
            upper &amp;&amp; lower &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 ||
            upper &amp;&amp; special &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 ||
            upper &amp;&amp; special &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; special &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; special &amp;&amp; password.length &gt; 8 ||

            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; special &amp;&amp; password.length &gt; 8 ||
            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; special &amp;&amp; upper &amp;&amp; password.length &gt; 8 ||
            digit &amp;&amp; digits &amp;&amp; special &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 8 || 
            digit &amp;&amp; digits &amp;&amp; special &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 8 ||
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; special &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; special &amp;&amp; password.length &gt; 8 ||

            special &amp;&amp; lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 ||
            special &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 8 ||
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 8 ||
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 8 || 
            special &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 8 ||
            special &amp;&amp; upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 8 || 
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; special &amp;&amp; password.length &gt; 8) {
                return rating(4, "strong");
           }



        if (lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 5 || 
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 5 || 
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||

            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 5 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 5 || 
            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||

            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 5 || 
            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||
            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 5 || 
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||

            lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||

            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||

            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||

            lower &amp;&amp; upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &gt; 5 ||
            lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; password.length &gt; 5 ||

            digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &gt; 5 || 
            digit &amp;&amp; digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &gt; 5 ||

            digit &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &lt; 8 ||
            digit &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &lt; 8 || 
            digits &amp;&amp; upper &amp;&amp; lower &amp;&amp; password.length &lt; 8 ||
            digits &amp;&amp; lower &amp;&amp; upper &amp;&amp; password.length &lt; 8 ||

            upper &amp;&amp; digit &amp;&amp; digits &amp;&amp; lower &amp;&amp; password.length &lt; 8 ||
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; digits &amp;&amp; password.length &lt; 8 ||
            upper &amp;&amp; lower &amp;&amp; digit &amp;&amp; special &amp;&amp; password.length &lt; 8) {
               return rating(3, "good");
            }
        return rating(2, "weak");
    }

    $.validator.passwordRating.messages = {
        "similar-to-username": "Too similar to username",
        "too-short": "Too short",
        "very-weak": "Very weak",
        "weak": "Weak",
        "good": "Good",
        "strong": "Strong",
        "very-strong": "Very Strong"
    }

    $.validator.addMethod("password", function (value, element, usernameField) {
        // use untrimmed value
        var password = element.value,
            // get username for comparison, if specified
            username = $(typeof usernameField != "boolean" ? usernameField : []);

        var rating = $.validator.passwordRating(password, username.val());
        // update message for this field
        var meter = $(".password-meter", element.form);

        meter.find(".password-meter-bar").removeClass().addClass("password-meter-bar").addClass("password-meter-" + rating.messageKey);
        meter.find(".password-meter-message").removeClass().addClass("password-meter-message").addClass("password-meter-message-" + rating.messageKey).text($.validator.passwordRating.messages[rating.messageKey]);
        // display process bar instead of error message
        return rating.rate &gt; 2;
    }, "&amp;nbsp;");
    // manually add class rule, to make username param optional
    $.validator.classRuleSettings.password = {
        password: true
    };
})(jQuery);
</code></pre>
