DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-10-11 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-10-11 19:17 ---
Add a intRange and floatRange 
functionality.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-10-08 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug





--- Additional Comments From [EMAIL PROTECTED]  2002-10-08 20:00 ---
In looking over the intent of range David implicitly
ment for it to be an Integer range:

So if this doesn't break the functionality freeze I propose:
   adding in validator-rules.xml
 "range"   - depreciate ???
 "rangeInt"
 "rangeLong"
 "rangeShort"
 "rangeDouble"
 "rangeDate"   
   adding in GenericValidator.java
  validateRange- depreciate this method ???
  validateIntRange
  validateLongRange
  validateShortRange
  validateDateRange

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-09-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug





--- Additional Comments From [EMAIL PROTECTED]  2002-09-19 17:28 ---
I've added the following to GenericValidator:

public static boolean isInRange(short value, short min, short max)
public static boolean isInRange(double value, double min, double max)
public static boolean isInRange(float value, float min, float max)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-08-24 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED



--- Additional Comments From [EMAIL PROTECTED]  2002-08-25 05:30 ---
James Farley,

  We can post a fix to the struts branch, however
  we will also need to make changes in the commons
  area.  I am submitting a new bug report for commons.

An alternative that may be more useful to do
RTTI first on the Range objects and check for 
Byte, Short, Integer, Long, Float, Double in that
in that order based on the Max, Min set, I am assuming they are
stored as Objects also ?

That way if the Range is 1 to 5 Integer and a user
inputs 1.3, and error would be detected,
but it would still allow range checking of
Doubles.



What do you think ? [EMAIL PROTECTED]



So I requested 
+public static boolean isInRange(double value, double min, double max)
+public static boolean isInRange(short value, short min, short max) 

to the GenericValidator code in commons.

-Rob

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-07-06 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug

[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Utilities   |Validator Framework

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-06-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug





--- Additional Comments From [EMAIL PROTECTED]  2002-06-25 13:07 ---
Created an attachment (id=2179)
There is one extra change that needs to be made to the validator-rules.xml file to 
make this happen.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-06-24 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug





--- Additional Comments From [EMAIL PROTECTED]  2002-06-24 20:14 ---
I will post the diffs I generated here as well as post them to the struts-dev 
mailing list.  Thanks for the help!

Index: GenericValidator.java
===
RCS file: /home/cvspublic/jakarta-
commons/validator/src/share/org/apache/commons/validator/GenericValidator.java,v
retrieving revision 1.5
diff -u -r1.5 GenericValidator.java
--- GenericValidator.java   2 Apr 2002 01:59:11 -   1.5
+++ GenericValidator.java   24 Jun 2002 20:06:32 -
@@ -247,7 +247,7 @@
  * @param  min The minimum value of the range.
  * @param  max The maximum value of the range.
 */
-public static boolean isInRange(int value, int min, int max) {
+public static boolean isInRange(double value, double min, double max) {
return ((value >= min) && (value <= max));
 }

Index: StrutsValidator.java
===
RCS file: /home/cvspublic/jakarta-
struts/src/share/org/apache/struts/util/StrutsValidator.java,v
retrieving revision 1.2
diff -u -r1.2 StrutsValidator.java
--- StrutsValidator.java2 Apr 2002 04:06:21 -   1.2
+++ StrutsValidator.java24 Jun 2002 20:10:31 -
@@ -403,9 +403,9 @@

if (!GenericValidator.isBlankOrNull(value)) {
   try {
- int iValue = Integer.parseInt(value);
- int min = Integer.parseInt(sMin);
- int max = Integer.parseInt(sMax);
+ double iValue = Double.parseDouble(value);
+ double min = Double.parseDouble(sMin);
+ double max = Double.parseDouble(sMax);

  if (!GenericValidator.isInRange(iValue, min, max)) {
 errors.add(field.getKey(), StrutsValidatorUtil.getActionError
(request, va, field));

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 10191] - Validator Range Checking Bug

2002-06-24 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191

Validator Range Checking Bug





--- Additional Comments From [EMAIL PROTECTED]  2002-06-24 19:50 ---
James:

Best thing to do in cases like this, where you've reviewed the code and know 
where changes are necessary, is to submit a patch.  Make sure to use "cvs diff -
u" for creating your patch.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: