title: How to validate date in the format "MM/dd/yyyy" in Spring Boot?
body: <p>I need to validate the given date has valid month, date and year. Basically, date format would be <code>MM/dd/yyyy</code>. But date coming like <code>13/40/2018</code> then I need to throw an error message like:</p>
  <blockquote>
  <p>invalid start date</p>
  </blockquote>
  <p>Is there any annotation available in spring to get this done?</p>
  <pre><code>@NotNull(message = ExceptionConstants.INVALID_START_DATE)
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = &quot;MM/dd/yyyy&quot;)
  private Date startDate;
  </code></pre>