title: How to avoid adding @Valid on each and every inner-class fields during the hibernate-validator?
body: <p>I am currently developing an application within that I am adding a few validations on an inner class such as <code>@NotNull, @Min, @Max, etc.</code></p>
  <p>To make the validations work I need to add the <code>@Valid</code> on each and every field which is making use of the inner class. Is there a way to avoid adding the <code>@Valid</code> on each and every object rather add some annotations on the Class so it can be applicable to all the fields within that class?</p>
  <p>I am currently using the following library to achieve the validations:</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
      &lt;artifactId&gt;quarkus-hibernate-validator&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>I tried to add the <code>@Validated</code> on the class but seems like this annotation is not available in this maven dependency. Can someone please let me know what I need to change?</p>
  <p>Following is a simple example that is working but I would like to remove <code>@Valid</code> that I have to add on each field. If I do not add <code>@Valid</code> then those inner classes won't be validated.</p>
  <pre><code>public class Book {
      @NotNull(message=&quot;Book ID cannot be NULL&quot;)
      private int bookId;
  
      @Valid
      private List&lt;Author&gt; author;
  
      @Valid
      private List&lt;Publication&gt; author;
  }
  
  
  public class Author {
      @NotNull(message=&quot;Author ID cannot be NULL&quot;)
      private int authorID;
  
      @NotNull(message=&quot;Author Name cannot be NULL&quot;)
      private String name;
  }
  
  
  public class Publication {
      @NotNull(message=&quot;Publication ID cannot be NULL&quot;)
      private int authorID;
  
      @NotNull(message=&quot;Publication Name cannot be NULL&quot;)
      private String name;
  }
  </code></pre>