Commits

Anonymous committed 4dbad9c

Can't specify date format anymore for min and max values when using annotation @DateRangeFieldValidator
o applied suggested patch

Issue Number: XW-500

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1406e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java

             params.put("fieldName", v.fieldName());
         }
         if ( v.min() != null && v.min().length() > 0) {
-            params.put("min", parseDateString(v.min()));
+             final Date minDate = parseDateString(v.min());
+             params.put("min", minDate == null ? v.min() : minDate);
         }
         if ( v.max() != null && v.max().length() > 0) {
-            params.put("max", parseDateString(v.max()));
+             final Date maxDate = parseDateString(v.max());
+             params.put("max", maxDate == null ? v.max() : maxDate);
         }
 
         ValidatorFactory.lookupRegisteredValidatorType(validatorType);