Java DateFormat: most convenient & elegant way to validate input date against multiple patterns
<p>I'm doing like that now:</p>

<pre><code>......

DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy");
try{
    dateFormat.parse(criteria.getPeriodFrom());
    dateFormat.parse(criteria.getPeriodTo());
}
catch{
    errors.reject("Incorrect format");
}

......
</code></pre>

<p>But what if I need to validate against few acceptable patterns (ex. "dd.MM.yyyy", "ddMMyyyy" ....). And I don't want to do any copy&amp;paste or iterate through collection of DateFormats :) Are there cool libraries for that?</p>
