title: How to validate a single parameter in DropWizard
body: <p>I want to validate some input parameters in DropWizard as documented here: <a href="https://dropwizard.github.io/dropwizard/manual/core.html#validation" rel="nofollow">https://dropwizard.github.io/dropwizard/manual/core.html#validation</a></p>
  
  <p>This example validates an object's properties, which works fine, but my service doesn't receive an object, but the parameters directly. This is a simplification of my code:</p>
  
  <pre><code>@GET
  @Path("/MyResource/{myresourceId}")
  public MyResource detail(@PathParam("myresourceId") @Valid @Size(min = 2, max = 5) String myresourceId) {
  </code></pre>
  
  <p>The @Valid and @Size annotations seem to be ignored in this case.
  Anyone knows if this is possible and if so how to do it right? Thanks.</p>