}
@SuppressWarnings("unchecked")
protected Errors doValidation(Class clazz, String path, Object value) throws Exception {
DomainEntity object = (DomainEntity) ClassUtils.instantiateClass(clazz);
object.initialize(contextHolder);
BeanWrapper validatable = new BeanWrapperImpl(object);
validatable.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), false));
validatable.setPropertyValue(path, value);
Errors errors = new BeanPropertyBindingResult(object, "target");
validator.validate(object, errors);