@SuppressWarnings("unchecked")
public void validate(final Object value) throws ValidationException
{
final BeanValidationContext beanValidationContext = environment.peek(BeanValidationContext.class);
if (beanValidationContext == null)
{
return;
}
final Validator validator = validatorFactory.getValidator();
String currentProperty = beanValidationContext.getCurrentProperty();
if (currentProperty == null) return;
Class<?> beanType = beanValidationContext.getBeanType();
String[] path = currentProperty.split("\\.");
BeanDescriptor beanDescriptor = validator.getConstraintsForClass(beanType);
for (int i = 1; i < path.length - 1; i++)
{