[ https://issues.apache.org/struts/browse/STR-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-2319: ------------------------------- Priority: Major (was: Minor) Affects Version/s: (was: Future) 1.2.2 Fix Version/s: 1.4.0 Assignee: Paul Benedict (was: Struts Developers) Summary: Validator validwhen comparisons of floats (was: [validator] Validwhen and floats(maybe integers)) > 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.