dgraham     2003/03/15 14:40:21

  Modified:    src/share/org/apache/struts/validator FieldChecks.java
  Log:
  validateMinLength and validateMaxLength are now independent of the
  required check.  PR #16548
  
  Revision  Changes    Path
  1.7       +2 -2      
jakarta-struts/src/share/org/apache/struts/validator/FieldChecks.java
  
  Index: FieldChecks.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/validator/FieldChecks.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FieldChecks.java  15 Mar 2003 22:27:44 -0000      1.6
  +++ FieldChecks.java  15 Mar 2003 22:40:21 -0000      1.7
  @@ -835,7 +835,7 @@
           }
           String sMaxLength = field.getVarValue("maxlength");
   
  -        if (value != null) {
  +        if (!GenericValidator.isBlankOrNull(value)) {
               try {
                   int max = Integer.parseInt(sMaxLength);
   
  @@ -882,7 +882,7 @@
           }
           String sMinLength = field.getVarValue("minlength");
   
  -        if (value != null) {
  +        if (!GenericValidator.isBlankOrNull(value)) {
               try {
                   int min = Integer.parseInt(sMinLength);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to