title: @Valid does not work for nested object in bean class in spring
body: <p>I have a Bean class which has one nested object like below.</p>
  
  <pre><code>import lombok.AllArgsConstructor;
  import lombok.Data;
  import lombok.NoArgsConstructor;
  import javax.validation.Valid;
  import javax.validation.constraints.NotNull;
      @Data
      @AllArgsConstructor
      @NoArgsConstructor
      public class UserRequestDTO {
  
          private String transactionId;
  
          private String email;
  
          @Valid @NotNull HistoryRequestDTO historyRequestDTO;
      }
  </code></pre>
  
  <p>This is the nested object bean class.</p>
  
  <pre><code>import javax.validation.constraints.*;
      @Data
      public class HistoryRequestDTO {
  
          @NotNull(message = Constants.INVALID_FIELD_DATA_EN_US)
          @Range(min = 0, max = 100, message = Constants.INVALID_FIELD_DATA_EN_US)
          @NumberFormat(style = NumberFormat.Style.NUMBER)
          Integer pageNumber;
  
          @NotNull(message = Constants.INVALID_FIELD_DATA_EN_US)
          @Range(min = 50, max = 500, message = Constants.INVALID_FIELD_DATA_EN_US)
          @NumberFormat(style = NumberFormat.Style.NUMBER)
          Integer pageSize;
      }
  </code></pre>
  
  <p>I already have implemented validator for HistoryRequestDTO and working fine seperately. But when I use UserRequestDTO, HistoryRequestDTO validator does not work.</p>
  
  <p>I tried to implement seperate validator for UserRequestDTO, but still  it is not calling  HistoryRequestDTO validator.</p>