public PropertyConstraint getPropertyConstraint(String propertyName) {
if (StringUtils.hasText(regExp))
{
if ((propertyName == null) || ("value".equals(propertyName))) {
return new PropertyValueConstraint("value", new RegexpConstraint(regExp, "regExpViolated"));
}
}
return null;
}