Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2319

Validator validwhen comparisons of floats

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.2
    • 1.4.0
    • Core
    • None
    • Operating System: All
      Platform: PC
    • 32871

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              pbenedict Paul Benedict
              masterperas@zmail.pt Nuno Furtado
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: