return new ActionError("error.date", fieldValue, dateExample);
return new ActionError("errors.date", fieldValue, dateExample);
    private ActionError validateAttribute(AttributeDescriptor attributeDescriptor,                                          ConstraintOp op, String fieldName, Object fieldValue,                                          Locale locale) {        Class fieldClass = TypeUtil.instantiate(attributeDescriptor.getType());        parsedFieldOps.put(fieldName, op);        try {            if (BagConstraint.VALID_OPS.contains(op)) {                // the value has to be the name of a saved bag or a saved query.  leave it                // as a String for now                parsedFieldValues.put(fieldName, fieldValue);            } else {                String stringFieldValue = (String) fieldValue;                                        if (stringFieldValue != null) {                    if (fieldClass.equals(Date.class)) {                        DateFormat dateFormat =                            DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT,                                                           locale);                        parsedFieldValues.put(fieldName, dateFormat.parse(stringFieldValue));                    } else {                        parsedFieldValues.put(fieldName, TypeUtil.stringToObject(fieldClass,                                                                                 stringFieldValue));                    }                }            }        } catch (ParseException e) {            Date dateExample = new GregorianCalendar().getTime();            return new ActionError("error.date", fieldValue, dateExample);        } catch (NumberFormatException e) {            String shortClassName =                fieldClass.getName().substring(fieldClass.getName().lastIndexOf(".") + 1);            return new ActionError("errors." + shortClassName.toLowerCase(), fieldValue);        }        return null;    }