title: How to check if given string is of specific date format?
body: <p>I want to check if a given string is in a particular dateformat. If not user should be able to throw error message.</p>
  
  <pre><code>DateTimeFormat format=DateTimeFormat.getFormat("yyyy-MM-dd");               
  Date d= format.parse("1990-10-");
  </code></pre>
  
  <p>with this input , it should give error. I tried with try and catch , but its not throwing any exception.</p>