ValangConditionExpressionParser conditionExpressionParser = new ValangConditionExpressionParser();
conditionExpressionParser.setCustomFunctions(functionsByName);
DefaultValidationRuleElementHandlerRegistry registry = new DefaultValidationRuleElementHandlerRegistry();
registry.setConditionExpressionParser(conditionExpressionParser);
registry.afterPropertiesSet();
DefaultXmlBeanValidationConfigurationLoader loader = new DefaultXmlBeanValidationConfigurationLoader();
loader.setResource(new ClassPathResource("validation.xml", getClass()));
loader.setElementHandlerRegistry(registry);
loader.afterPropertiesSet();