in src/main/java/org/apache/commons/validator/DateValidator.java [104:129]
public boolean isValid(final String value, final Locale locale) {
if (value == null) {
return false;
}
DateFormat formatter;
if (locale != null) {
formatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
} else {
formatter =
DateFormat.getDateInstance(
DateFormat.SHORT,
Locale.getDefault());
}
formatter.setLenient(false);
try {
formatter.parse(value);
} catch (final ParseException e) {
return false;
}
return true;
}