Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.4, 2.1.1
    • Fix Version/s: 2.3-M1
    • Component/s: Data binding
    • Labels:
      None

      Description

      I don't think the bug discussed here http://archive.codehaus.org/lists/org.codehaus.grails.dev/msg/l2kd95c613f1004281236x5b1317c9xb0787a80413a2899@mail.gmail.com was ever JIRA'd.

      I created a simple domain class:

        class Book { 
            String title 
            String author 
            Float price 
        }
      

      and scaffolded it. I then created a new book from the UI with a valid title and author, but a price of "12.99skdfhaskfjh". No validation errors were triggered! The "skdfhaskfjh" suffix was silently removed and the value saved as 12.99

        Issue Links

          Activity

          Show
          Iván López added a comment - Another test case with Command Objects here: http://grails.1312388.n4.nabble.com/Casting-of-named-params-not-working-with-Command-Objects-td4640199.html
          Hide
          Graeme Rocher added a comment -

          Jeff - maybe look at this as part of your data binding work

          Show
          Graeme Rocher added a comment - Jeff - maybe look at this as part of your data binding work
          Hide
          Peter N. Steinmetz added a comment -

          On Jan 2 there was another mention of this, which looks like the same bug.

          bhushan154 <bhushan154@gmail.com> wrote:

          I have an integer variable in a domain class
          class Equipment

          { Integer equipmentNumber }

          In the form, when I provide input as 123abc, it is being accepted and stored
          as 123. How do I make it throw a validation fail message instead?

          Show
          Peter N. Steinmetz added a comment - On Jan 2 there was another mention of this, which looks like the same bug. bhushan154 <bhushan154@gmail.com> wrote: I have an integer variable in a domain class class Equipment { Integer equipmentNumber } In the form, when I provide input as 123abc, it is being accepted and stored as 123. How do I make it throw a validation fail message instead?

            People

            • Assignee:
              Jeff Scott Brown
              Reporter:
              Donald
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last Reviewed:

                Development