You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/27 01:46:35 UTC
[jira] Resolved: (STR-2319) Validator validwhen comparisons of
floats
[ https://issues.apache.org/struts/browse/STR-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict resolved STR-2319.
--------------------------------
Resolution: Fixed
> Validator validwhen comparisons of floats
> -----------------------------------------
>
> Key: STR-2319
> URL: https://issues.apache.org/struts/browse/STR-2319
> Project: Struts 1
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.2.2
> Environment: Operating System: All
> Platform: PC
> Reporter: Nuno Furtado
> Assignee: Paul Benedict
> Fix For: 1.4.0
>
>
> I needed to validate a field if another one was diferent than zero, it should be
> expected that i was able to do it like so :
> <field property="outros" depends="validwhen">
> <arg2 key="compostagemdataForm.outros.invalido"/>
> <var>
> <var-name>test</var-name>
> <var-value>(qtoutros==0)</var-value>
> </var>
> </field>
> For some reason this rule allways failed. i had to reformulate the rule :
> <field property="outros" depends="validwhen">
> <arg2 key="compostagemdataForm.outros.invalido"/>
> <var>
> <var-name>test</var-name>
> <var-value>(qtoutros=='0.0') </var-value>
> </var>
> </field>
> wich is weird! qtoutros is a String property on the bean, but can be converted
> to float.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.