title: micronaut applying @Validation to inbound controller POJO(s) doesn't validate
body: <p>Given this controller method.</p>
  <pre><code>import io.micronaut.validation.Validated;
  ...
  
  @Validated
  @Get(value = &quot;test{?page*}&quot;, produces = APPLICATION_JSON)
  public HttpResponse&lt;TransactionListResponseDto&gt; get(
          PageDto page) {
      Sort sort = Pageable.from(page.getPage(), page.getSize(), sortFrom(page.getSort()));
      return HttpResponse.ok();
  }
  </code></pre>
  <p>and the PageDto that looks like this.</p>
  <pre><code>import javax.validation.constraints.Min;
  ...
  
  @Getter
  @Setter
  @Introspected
  @JsonInclude(NON_NULL)
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class PageDto {
      @Min(1)
      private int page = 1;
      private int size = 10;
      private String sort;
  }
  </code></pre>
  <p>and the necessary validation includes in the gradle file.</p>
  <pre><code>implementation &quot;io.micronaut:micronaut-validation:$micronautVersion&quot;
  implementation &quot;io.micronaut.beanvalidation:micronaut-hibernate-validator:$micronautVersion&quot;
  </code></pre>
  <p>I am expecting that controller method to validate the arguments, but it's very happy for me to pass in (for example) <code>-100</code> as the page number, despite the validation attributes.
  Following the <a href="https://docs.micronaut.io/1.2.6/guide/index.html#beanValidation" rel="nofollow noreferrer">documentation</a> and <a href="https://blog.jdriven.com/2019/03/micronaut-mastery-binding-request-parameters-to-pojo/" rel="nofollow noreferrer">advice</a>.</p>
  <p>I have to conclude I am missing a build step or something?</p>