return new TaskValidator(buildBeanValidator());
}
public BeanValidator buildBeanValidator(){
if(isClassPresent("javax.validation.Validation")){
ValidatorFactory factory = new ValidatorFactoryCreator().getInstance();
return new CustomJSR303Validator(factory.getValidator(), factory.getMessageInterpolator());
}
else
return new NullBeanValidator();
}