dgraham 2003/06/24 19:10:35 Modified: conf/share validator-rules.xml Log: Change javascript min length validation to match the server side checks. The server considered all whitespace to be a passing condition but the javascript would fail because it wasn't trimming the value before testing the length. Now the javascript will pass if all whitespace is entered. Revision Changes Path 1.33 +1 -1 jakarta-struts/conf/share/validator-rules.xml Index: validator-rules.xml =================================================================== RCS file: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- validator-rules.xml 25 Jun 2003 01:08:12 -0000 1.32 +++ validator-rules.xml 25 Jun 2003 02:10:35 -0000 1.33 @@ -145,7 +145,7 @@ field.type == 'textarea') { var iMin = parseInt(oMinLength[x][2]("minlength")); - if ((field.value.length > 0) && (field.value.length < iMin)) { + if ((trim(field.value).length > 0) && (field.value.length < iMin)) { if (i == 0) { focusField = field; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]