protected AbstractValidationRule createValidationRule(Element element) {
String expression = element.getAttribute(EXPRESSION_ATTR);
if (!StringUtils.hasText(expression)) {
throw new ValidationConfigurationException("Element '" + ELEMENT_NAME + "' must have an 'expression' attribute");
}
return new RegExpValidationRule(expression);
}