Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-984

Validation violation type should be determined without traversing @Valid associations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.5.Final
    • 3.0.4.Final
    • jaxrs
    • None

    Description

      In a case like

         @Path("/{s}/{t}")
         public static class TestResourceWithGraph
         {
            @Valid B b;
      
            public TestResourceWithGraph(@PathParam("s") String s, @PathParam("t") String t)
            {
               b = new B(s, t);
            }
      
            @POST
            public void post()
            {
            }
         }
      
         public static class B
         {
            @Size(min=4) String s;
            @Size(min=5) String t;
      
            public B(String s, String t)
            {
               this.s = s;
               this.t = t;
            }
            public void setT(String t)
            {
               this.t = t;
            }
            public String getT()
            {
               return t;
            }
         }
      

      the violations on B.s and B.t should both be reported as FIELD violations.

      Attachments

        Activity

          People

            rsigal@redhat.com Ronald Sigal
            rsigal@redhat.com Ronald Sigal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: