I want to check if a given string is in a particular dateformat. If not user should be able to throw error message.
DateTimeFormat format=DateTimeFormat.getFormat("yyyy-MM-dd");
Date d= format.parse("1990-10-");
with this input , it should give error. I tried with try and catch , but its not throwing any exception.