}else if (MatchesConstraint.NAME.equals(config.getConstraintName())) {
return new MatchesConstraint();
}else if (InvalidFieldConstraint.NAME.equals(config.getConstraintName())) {
return new InvalidFieldConstraint();
}else if (MandatoryFieldConstraint.NAME.equals(config.getConstraintName())) {
return new MandatoryFieldConstraint();
} else {
throw new IllegalArgumentException("Constraint unknown: " + config.getConstraintName());
}
}