title: Validation Constraint, optional field in DTO?
body: <p>I have a DTO with a couple fields, username, password and email All of them Strings.</p>
  
  <p>I also have a List that I want as an optional, meaning it does not have to be passed in from the form and can be left blank.</p>
  
  <p>This should be valid from the front-end:</p>
  
  <pre><code>{
  "username":"user",
  "email":"email@email.com",
  "password": "123",
  "hobbies":[ "Weightlifting", "Dancing"]
  } 
  </code></pre>
  
  <p>So should this:</p>
  
  <pre><code>{
  "username":"user",
  "email":"email@email.com",
  "password": "123"
  } 
  </code></pre>
  
  <p>Is there any @OptionalField annotation or the likes within javax.validation.constraints?</p>
  
  <p>Or is my only option two seperate DTOs?</p>