Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2409

type="number" fails when decimal separator isn't "."

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.4
    • None
    • tapestry-core
    • None

    Description

      This probably affects versions before 5.4 too.

      I have BigDecimal fields that I'm editing with TextField. On mobile devices I would like a numeric keyboard to pop up, so I added type="number".

      This all worked just fine in English, but then I switched locale to French and found Tapestry's client-side validation rejecting it as not a number.

      Digging around, I found that with type="number", the W3C spec requires the browser to translate the field value to a String with a "." decimal separator. The problem for Tapestry is that Tapestry's validation always expects the field value to be untouched and in the format of the locale.

      Attachments

        Activity

          People

            jkemnade Jochen Kemnade
            geoffcallender Geoff Callender
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: