Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-847

Max and Min validators throw NumberFormatException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 4.0
    • 4.1
    • Framework
    • None

    Description

      I have a text field on a form into which a user is supposed to enter a number within a certain range. So I added the max and min validators to the text field hoping they would do what they're supposed to do. Unfortunately, a user quickly discovered that if they don't follow the instructions and enter a letter into that text field they get an ugly NumberFormatException. I poked around a little and found that I can't even catch that exception to present something nicer to the user because my listener method never even gets called. So, it would be extremely useful if the numerical related validators caught NumberFormatException and provided a "The value must a be number" error message.

      In this particular case, using any kind of drop down or selection box widget wouldn't work because the number range is quite large (basically from 0 to several million).

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhavyn Chris Conrad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: