Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 93426 invoked from network); 4 Mar 2003 03:52:13 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 4 Mar 2003 03:52:13 -0000 Received: (qmail 571 invoked by uid 97); 4 Mar 2003 03:54:00 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 564 invoked from network); 4 Mar 2003 03:53:59 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 4 Mar 2003 03:53:59 -0000 Received: (qmail 92778 invoked by uid 500); 4 Mar 2003 03:52:07 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 92764 invoked by uid 500); 4 Mar 2003 03:52:07 -0000 Received: (qmail 92759 invoked from network); 4 Mar 2003 03:52:07 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 4 Mar 2003 03:52:07 -0000 Received: (qmail 40846 invoked by uid 1581); 4 Mar 2003 03:52:06 -0000 Date: 4 Mar 2003 03:52:06 -0000 Message-ID: <20030304035206.40845.qmail@icarus.apache.org> From: dgraham@apache.org To: jakarta-struts-cvs@apache.org Subject: cvs commit: jakarta-struts/conf/share validator-rules.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N dgraham 2003/03/03 19:52:06 Modified: conf/share validator-rules.xml Log: Fixed PR#17622. Revision Changes Path 1.26 +52 -21 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.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- validator-rules.xml 15 Feb 2003 12:40:25 -0000 1.25 +++ validator-rules.xml 4 Mar 2003 03:52:06 -0000 1.26 @@ -287,15 +287,24 @@ } if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; - var iValue = parseInt(value); - if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) { - if (i == 0) { - focusField = field; + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + bValid = false; } - fields[i++] = oByte[x][1]; - bValid = false; - } + } } } @@ -350,14 +359,23 @@ } if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + + } else { - var iValue = parseInt(value); - if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) { - if (i == 0) { - focusField = field; + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + bValid = false; } - fields[i++] = oShort[x][1]; - bValid = false; } } } @@ -415,6 +433,11 @@ if (!isAllDigits(value)) { bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + } else { var iValue = parseInt(value); if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) { @@ -507,15 +530,23 @@ } if (value.length > 0) { - - var iValue = parseFloat(value); - if (isNaN(iValue)) { - if (i == 0) { - focusField = field; + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + + } else { + var iValue = parseFloat(value); + if (isNaN(iValue)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + bValid = false; } - fields[i++] = oFloat[x][1]; - bValid = false; - } + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-dev-help@jakarta.apache.org