Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Must be whole number in floatRange validator?!?

    Using smart GWT EE 2.3 (evaluation and nightly build of 28/07).

    In my datasource xml I have defined following field with a floatRange validator. Min and max set to values shown below...

    Code:
    <field sraId="1315" name="deviationPercOnDistanceAllowed" title="deviation Perc On Distance Allowed" type="float" emptyCellValue="0.1" crud="15" >
    <validators>
    <validator clientOnly="true" stopIfFalse="true" type="floatRange"
    min="0.1" max="1.0" />
    </validators>
    </field>
    When I set the value in the field to a value that should give a validation error nothing happens... digging in my log I get the following message?!?

    Code:
    WARN  Validation - Validation errors validating a 'DataSource':
    {
        "/DataSource[@ID=106]/fields/field[@name=deviationPercOnDistanceAllowed]/validators/validator":{
            recordPath:"/DataSource[@ID=106]/fields/field[@name=deviationPercOnDistanceAllowed]/validators/validator",
            max:{
                errorMessage:"Must be a whole number."
            },
            min:{
                errorMessage:"Must be a whole number."
            }
        }
    }
    Am I missing something?!? Seems pretty straight forward...
    Thanx!

    #2
    Spurious warning that can be ignored. We'll try to eliminate it.

    Comment


      #3
      Thanx, keep me posted on a fix!

      Comment


        #4
        Hi, it looks like floatRange validator still does not work if you use any decimal places in the validator? Are there plans to fix this for 8.0?

        Comment


          #5
          Is there an update on this?

          Comment


            #6
            Hi

            You're right that the warning is still being displayed, but it shouldn't be breaking any actual functionality.

            We're not reproducing any problems with min/max defined as floats on our end - for example - if modifying the SupplyItem dataSource shipped with BuiltInDS etc to have unitCost's floatRange validator match that in the original post in this thread, while we see the warning on the server, the validator correctly restricts user entry on any form bound to the DataSource to the range 0.1 -> 1.0.

            Can you let us know how you're reproducing the actual erroneous behavior?

            Thanks
            Isomorphic Software

            Comment


              #7
              FYI - we believe we've now fixed the warning - let us know if you continue to see it

              Comment

              Working...
              X