Files
struts/core
Lukasz Lenart fef0539567 WW-5579 Add missing DoubleRangeFieldValidator and ShortRangeFieldValidator to @Validations container (#1390)
This commit addresses a long-standing gap in the Struts validation framework where @DoubleRangeFieldValidator
and @ShortRangeFieldValidator annotations could not be used within the @Validations container annotation,
despite being fully functional as standalone annotations.

Changes made:
- Added doubleRangeFields() and shortRangeFields() methods to @Validations annotation interface
- Updated JavaDoc to document the new fields and corrected the parameters table
- Added processing loops for both validators in AnnotationValidationConfigurationBuilder
- Created comprehensive test coverage in AnnotationValidationConfigurationBuilderTest
- Added AnnotationValidationsContainerAction test class demonstrating proper usage

The implementation follows the exact same pattern used by IntRangeFieldValidator and LongRangeFieldValidator,
ensuring consistency across all range validators in the framework.

All existing tests continue to pass, and new tests verify that multiple validators of each type
can be properly configured within the @Validations container.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-19 19:11:08 +02:00
..

Struts 2 Core

This is a core of the Apache Struts framework and all other modules depend on it. It requires Java 8 at minimum and a Servlet container supporting Java Servlet API 3.1 at least.

Installation

Just drop this plugin into WEB-INF/lib folder or add it as Maven dependency