struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject cvs commit: jakarta-struts/conf/share validator-rules.xml
Date Mon, 20 Jan 2003 05:12:32 GMT
martinc     2003/01/19 21:12:32

  Modified:    conf/share validator-rules.xml
  Log:
  Allow '8' as a valid decimal and hexadecimal digit... ;-)
  Add support for integer input in octal format.
  
  Revision  Changes    Path
  1.22      +5 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- validator-rules.xml	20 Jan 2003 04:32:24 -0000	1.21
  +++ validator-rules.xml	20 Jan 2003 05:12:32 -0000	1.22
  @@ -428,11 +428,14 @@
   
               function isAllDigits(argvalue) {
                   argvalue = argvalue.toString();
  -                var validchars = "012345679";
  +                var validchars = "0123456789";
                   var startFrom = 0;
                   if (argvalue.substring(0, 2) == "0x") {
  -                   validchars = "012345679abcdefABCDEF";
  +                   validchars = "0123456789abcdefABCDEF";
                      startFrom = 2;
  +                } else if (argvalue.charAt(0) == "0") {
  +                   validchars = "01234567";
  +                   startFrom = 1;
                   }
                   for (var n = 0; n < argvalue.length; n++) {
                       if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
  
  
  

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message