title: NetCore SwaggerUI - Get Route - Validations for parameters are not displayed to user
body: <p>I'm trying to define a type of &quot;GET&quot; route in my WebApi (Net 5) that use 2 route parameter and they require validations, the parameters come from the route. I need the same pattern multiple actions in other controllers too. So, i've tried to use the ValidationAttribute like we do in POST, SwaggerUI know when there is error with the parameters and know when the parameters are valid but doesn't show the errors.</p>
  <pre><code>ex:
  /calendar/year/month
  
  year must be between 2020 AND 2030
  month must be between 1 AND 12
  </code></pre>
  <p>so, i've started with something like this</p>
  <pre><code>public class YearMonth
  {
      [Range(2020, 2030, ErrorMessage = &quot;The year must be between 2020 AND 2030&quot;)]
      public int Year { get; set; }
  
      [Range(1, 12, ErrorMessage = &quot;The month must be between 1 AND 12&quot;)]
      public int Month { get; set; }
  }
  
  [HttpGet(&quot;{Year}/{Month}&quot;)]
  public async Task&lt;ActionResult&lt;Calendar&gt;&gt; Get([FromRoute] YearMonth yearMonth)
  {
  
  }
  </code></pre>
  <p>My problem is that Swagger UI know the validation so it doesnt fire the request if the year or the month doesn't pass the validation. It show that the field is in error!</p>
  <p>But there is nothing in the UI that show why there is an error or what is the error exactly!</p>
  <p><a href="https://i.stack.imgur.com/NySnp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NySnp.png" alt="enter image description here" /></a></p>
  <p>Is there a way to add the validations errors?</p>
  <p>Or is there a way to add a label to describe the validations?</p>
  <p>When we post data to the API, it execute the request even if the object is not valid and return the HttpResponseMessage with the errors in it, I was expecting the same from the Get Method!</p>
  <p><a href="https://i.stack.imgur.com/4cvUJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4cvUJ.png" alt="enter image description here" /></a></p>