title: Date validation for Java 8 Time API in Spring
body: <p>We all know the classic example of a date validation in the controller inside the <code>initBinder</code> method:</p>
  
  <pre><code>@InitBinder
  public void initBinder(WebDataBinder binder) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
      binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
  }
  </code></pre>
  
  <p>But what is the alternative to support the new <strong>Java 8 Time API</strong>, where we need to replace <code>DateFormat</code> to <code>DateTimeFormatter</code>? What tools Spring Framework provides for this?</p>
  
  <p>Thanks.</p>