title: Validate at least one of three field in dto spring boot
body: <p>I have a DTO that looks something like this:</p>
  
  <pre><code>class VehicleDto {
      private String type;
      private Car car;
      private Bike bike;
  }
  </code></pre>
  
  <p>Now depending on the type, I need to validate on at least one of Car and Bike. </p>
  
  <p>Both cannot be present in the same request. </p>
  
  <p>How can I do that?</p>