You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "HC (JIRA)" <ji...@apache.org> on 2006/06/02 17:07:16 UTC

[jira] Created: (STR-2882) Validator: Using validwhen with float validation

Validator: Using validwhen with float validation
------------------------------------------------

         Key: STR-2882
         URL: http://issues.apache.org/struts/browse/STR-2882
     Project: Struts Action 1
        Type: Bug

  Components: Unknown  
    Versions: 1.2 Family    
 Environment: I am using Windows XP, JDK 1.4, Struts 1.2.8
    Reporter: HC


1. This has to do with the "validwhen" validations. Especially when used with "float" as defined in validation.xml.
Scenario: I have a field which is validated as follows:
- It is a float.
- It has to be > 0.

When I input 0, the validation works correctly i.e. I get an error. But when I input 0.0, the validation does not raise an error.

My thought is that there is a problem with the way the <var> element for the "validwhen" is parsed.

2. Another place where I see somewhat similar behavior is as follows.
Scenario: I have a field which is validated as follow:
- It is a float
- It has to <= 12

When I input something like 4, it goes through fine i.e. I don't get an error. But when I input something like 4.5 or 4.7 or 5.3 (basically numbers with decimal points), I get an error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STR-2882) Validator: Using validwhen with float validation

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2882?page=comments#action_37437 ] 

Henri Yandell commented on STR-2882:
------------------------------------

Some info that sounds useful in helping with this issue are the relevant parts of your configuration, and the version of commons-validator that you're using.  It might point out something obvious.

> Validator: Using validwhen with float validation
> ------------------------------------------------
>
>          Key: STR-2882
>          URL: http://issues.apache.org/struts/browse/STR-2882
>      Project: Struts Action 1
>         Type: Bug

>   Components: Unknown
>     Versions: 1.2 Family
>  Environment: I am using Windows XP, JDK 1.4, Struts 1.2.8
>     Reporter: HC

>
> 1. This has to do with the "validwhen" validations. Especially when used with "float" as defined in validation.xml.
> Scenario: I have a field which is validated as follows:
> - It is a float.
> - It has to be > 0.
> When I input 0, the validation works correctly i.e. I get an error. But when I input 0.0, the validation does not raise an error.
> My thought is that there is a problem with the way the <var> element for the "validwhen" is parsed.
> 2. Another place where I see somewhat similar behavior is as follows.
> Scenario: I have a field which is validated as follow:
> - It is a float
> - It has to <= 12
> When I input something like 4, it goes through fine i.e. I don't get an error. But when I input something like 4.5 or 4.7 or 5.3 (basically numbers with decimal points), I get an error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (STR-2882) Validator: Using validwhen with float validation

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2882?page=all ]

Niall Pemberton resolved STR-2882.
----------------------------------

    Resolution: Duplicate

Closing as a duplicate of STR-2321

> Validator: Using validwhen with float validation
> ------------------------------------------------
>
>                 Key: STR-2882
>                 URL: http://issues.apache.org/struts/browse/STR-2882
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Unknown
>    Affects Versions: 1.2 Family
>         Environment: I am using Windows XP, JDK 1.4, Struts 1.2.8
>            Reporter: HC
>
> 1. This has to do with the "validwhen" validations. Especially when used with "float" as defined in validation.xml.
> Scenario: I have a field which is validated as follows:
> - It is a float.
> - It has to be > 0.
> When I input 0, the validation works correctly i.e. I get an error. But when I input 0.0, the validation does not raise an error.
> My thought is that there is a problem with the way the <var> element for the "validwhen" is parsed.
> 2. Another place where I see somewhat similar behavior is as follows.
> Scenario: I have a field which is validated as follow:
> - It is a float
> - It has to <= 12
> When I input something like 4, it goes through fine i.e. I don't get an error. But when I input something like 4.5 or 4.7 or 5.3 (basically numbers with decimal points), I get an error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2882) Validator: Using validwhen with float validation

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-2882:
-------------------------------

    Fix Version/s: 1.4.0
         Assignee: Paul Benedict
       Issue Type: Improvement  (was: Bug)

> Validator: Using validwhen with float validation
> ------------------------------------------------
>
>                 Key: STR-2882
>                 URL: https://issues.apache.org/struts/browse/STR-2882
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Unknown
>    Affects Versions: 1.2 Family
>         Environment: I am using Windows XP, JDK 1.4, Struts 1.2.8
>            Reporter: HC
>            Assignee: Paul Benedict
>             Fix For: 1.4.0
>
>
> 1. This has to do with the "validwhen" validations. Especially when used with "float" as defined in validation.xml.
> Scenario: I have a field which is validated as follows:
> - It is a float.
> - It has to be > 0.
> When I input 0, the validation works correctly i.e. I get an error. But when I input 0.0, the validation does not raise an error.
> My thought is that there is a problem with the way the <var> element for the "validwhen" is parsed.
> 2. Another place where I see somewhat similar behavior is as follows.
> Scenario: I have a field which is validated as follow:
> - It is a float
> - It has to <= 12
> When I input something like 4, it goes through fine i.e. I don't get an error. But when I input something like 4.5 or 4.7 or 5.3 (basically numbers with decimal points), I get an error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-2882) Validator: Using validwhen with float validation

Posted by "HC (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2882?page=comments#action_38643 ] 
            
HC commented on STR-2882:
-------------------------


   [[ Old comment, sent by email on Wed, 8 Nov 2006 20:34:00 -0600 ]]

Cool! Thanks.



-- 
http://hchaudh1.stumbleupon.com/



> Validator: Using validwhen with float validation
> ------------------------------------------------
>
>                 Key: STR-2882
>                 URL: http://issues.apache.org/struts/browse/STR-2882
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Unknown
>    Affects Versions: 1.2 Family
>         Environment: I am using Windows XP, JDK 1.4, Struts 1.2.8
>            Reporter: HC
>
> 1. This has to do with the "validwhen" validations. Especially when used with "float" as defined in validation.xml.
> Scenario: I have a field which is validated as follows:
> - It is a float.
> - It has to be > 0.
> When I input 0, the validation works correctly i.e. I get an error. But when I input 0.0, the validation does not raise an error.
> My thought is that there is a problem with the way the <var> element for the "validwhen" is parsed.
> 2. Another place where I see somewhat similar behavior is as follows.
> Scenario: I have a field which is validated as follow:
> - It is a float
> - It has to <= 12
> When I input something like 4, it goes through fine i.e. I don't get an error. But when I input something like 4.5 or 4.7 or 5.3 (basically numbers with decimal points), I get an error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira