dgraham 2002/12/08 19:45:23
Modified: conf/share validator-rules.xml
Log:
Changed boolean logic for max and min length checks for clarity.
Revision Changes Path
1.17 +2 -2 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.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- validator-rules.xml 9 Dec 2002 03:36:45 -0000 1.16
+++ validator-rules.xml 9 Dec 2002 03:45:23 -0000 1.17
@@ -118,7 +118,7 @@
if (form[oMinLength[x][0]].type == 'text' ||
form[oMinLength[x][0]].type == 'textarea') {
var iMin = parseInt(oMinLength[x][2]("minlength"));
- if (!(form[oMinLength[x][0]].value.length >= iMin)) {
+ if (form[oMinLength[x][0]].value.length < iMin) {
if (i == 0) {
focusField = form[oMinLength[x][0]];
}
@@ -160,7 +160,7 @@
if (form[oMaxLength[x][0]].type == 'text' ||
form[oMaxLength[x][0]].type == 'textarea') {
var iMax = parseInt(oMaxLength[x][2]("maxlength"));
- if (!(form[oMaxLength[x][0]].value.length <= iMax)) {
+ if (form[oMaxLength[x][0]].value.length > iMax) {
if (i == 0) {
focusField = form[oMaxLength[x][0]];
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>