Lukasz Lenart created WW-5579:
---------------------------------

             Summary: @DoubleRangeFieldValidator and @ShortRangeFieldValidator 
missing from @Validations container annotation
                 Key: WW-5579
                 URL: https://issues.apache.org/jira/browse/WW-5579
             Project: Struts 2
          Issue Type: Dependency
          Components: Annotations
            Reporter: Lukasz Lenart
             Fix For: 7.2.0


  The @Validations container annotation does not include fields for 
@DoubleRangeFieldValidator and @ShortRangeFieldValidator, making it impossible 
to use multiple instances of these validators within a single @Validations 
annotation.

  Current State:
  - @Validations includes: intRangeFields, longRangeFields, dateRangeFields
  - @Validations missing: doubleRangeFields, shortRangeFields

  Expected Behavior:
  Developers should be able to use @DoubleRangeFieldValidator and 
@ShortRangeFieldValidator within @Validations container, similar to other range 
validators:

  @Validations(
      intRangeFields = {@IntRangeFieldValidator(...)},
      longRangeFields = {@LongRangeFieldValidator(...)},
      doubleRangeFields = {@DoubleRangeFieldValidator(...)},  // NOT AVAILABLE
      shortRangeFields = {@ShortRangeFieldValidator(...)}     // NOT AVAILABLE
  )

  Impact:
  Users must scatter double/short range validations across XML configuration or 
use standalone annotations, breaking consistency with other validators.

  Note:
  - Both validators work correctly when used as standalone annotations 
(directly on methods)
  - JavaDoc in Validations.java:136 incorrectly shows shortRangeFields in 
example
  - Processing infrastructure exists in 
AnnotationValidationConfigurationBuilder 
(processDoubleRangeFieldValidatorAnnotation(), 
processShortRangeFieldValidatorAnnotation())
  - Related historical issues: WW-4004, WW-4011 improved these annotations but 
didn't add container support

  Files Affected:
  - core/src/main/java/org/apache/struts2/validator/annotations/Validations.java
  - 
core/src/main/java/org/apache/struts2/validator/AnnotationValidationConfigurationBuilder.java




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to