
    function validateMinLength(form) {
        var isValid = true;
        var focusField = null;
        var i = 0;
        var fields = new Array();
        oMinLength = new minlength();
        for (x in oMinLength) {
            var field = form[oMinLength[x][0]];

            if (field.type == 'text' ||
                field.type == 'textarea') {

                var iMin = parseInt(oMinLength[x][2]("minlength"));
                if ((field.value.length > 0) && (field.value.length < iMin)) {
                    if (i == 0) {
                        focusField = field;
                    }
                    fields[i++] = oMinLength[x][1];
                    isValid = false;
                }
            }
        }
        if (fields.length > 0) {
           focusField.focus();
           alert(fields.join('\n'));
        }
        return isValid;
    }

    function validateMinLength(form) {
        var isValid = true;
        var focusField = null;
        var i = 0;
        var fields = new Array();
        oMinLength = new minlength();
        for (x in oMinLength) {
            var field = form[oMinLength[x][0]];

            if (field.type == 'text' ||
                field.type == 'textarea') {

                var iMin = parseInt(oMinLength[x][2]("minlength"));
                if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
                    if (i == 0) {
                        focusField = field;
                    }
                    fields[i++] = oMinLength[x][1];
                    isValid = false;
                }
            }
        }
        if (fields.length > 0) {
           focusField.focus();
           alert(fields.join('\n'));
        }
        return isValid;
    }
Copy minlength change over from Struts. Now minlength passes if all whitespace is entered.
Copy minlength change over from Struts.  Now minlength passes if all whitespace is entered.


git-svn-id: c96248f4ce6931c9674b921fd55ab67490fa1adf@140031 13f79535-47bb-0310-9956-ffa450edef68
