Tapestry
  1. Tapestry
  2. TAPESTRY-795

Client-side validation of numbers doesn't allow punctuation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: Framework
    • Labels:
      None

      Description

      Client side input validation assumes that numbers can be validated using isNaN(), which knows nothing about punctiation: 1,000,000 is a valid number that will be rejected.

      Further, on the server side, this value will not be handled correctly; if the translator's pattern is "#" (the default), this value is truncated to "1" rather than it being an input error. In any case, the client and the server should support grouping characters as defined by the active locale.

        Issue Links

          Activity

          Hide
          Jesse Kuhnert added a comment -

          This is in the middle of being fixed already with the new validation client side system ala dojo. IBM has contributed i8n code that will allow the same sort of flexibility on the client side that people have been used to on the server.

          Show
          Jesse Kuhnert added a comment - This is in the middle of being fixed already with the new validation client side system ala dojo. IBM has contributed i8n code that will allow the same sort of flexibility on the client side that people have been used to on the server.
          Hide
          Jesse Kuhnert added a comment -

          A certain business machines corporation has dojo code to handle all of our i8ln issues already, they're just waiting on the g-damn lawyers to clear up the road for releasing it.

          Show
          Jesse Kuhnert added a comment - A certain business machines corporation has dojo code to handle all of our i8ln issues already, they're just waiting on the g-damn lawyers to clear up the road for releasing it.
          Hide
          Leonardo Quijano Vincenzi added a comment -

          I implemented a parseLocalizedNumber() Javascript method in Tacos (the file helper_functions.js) that could work for this. Is based on Dojo, though, but if anyone's interested, he can port it over to Tapestry 4.0.

          Show
          Leonardo Quijano Vincenzi added a comment - I implemented a parseLocalizedNumber() Javascript method in Tacos (the file helper_functions.js) that could work for this. Is based on Dojo, though, but if anyone's interested, he can port it over to Tapestry 4.0.

            People

            • Assignee:
              Unassigned
              Reporter:
              Howard M. Lewis Ship
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development