title: How to set a max size of each item in a list passed to the rest api?
body: <p>I have this REST API built that accepts a fleetName and list of serialNumbers. I know that I can limit the character size of fleetName as shown, but is there any way to limit the character length on each item in the list of serial numbers in this rest call?</p>
  <p>REST Call:</p>
  <pre class="lang-java prettyprint-override"><code>@GetMapping(&quot;/rest/slt/fleet/save&quot;)
  public Fleet saveFleet(@RequestParam(value = &quot;fleetName&quot;) @Max(value = 40) String fleetName,
              @RequestParam(value = &quot;serialNoList&quot;) String[] serialNoList) {
  
      return fleetService.saveFleet(fleetName, serialNoList);
  }
  </code></pre>