public static RangeValidator CreateValidator(Type type, string errorMessage, string propertyName, object minValue, object maxValue) { return(new RangeValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), minValue, maxValue)); }