public static NestedValidator CreateValidator(Type type, string errorMessage, string propertyName)
 {
     return(new NestedValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName)));
 }
 public static CustomValidator CreateValidator(Type type, string errorMessage, string propertyName, ICustomValidationRule customValidationRule)
 {
     return(new CustomValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), customValidationRule));
 }
 public static RegexValidator CreateValidator(Type type, string errorMessage, string propertyName, string regex)
 {
     return(new RegexValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), regex));
 }
 public static RequiredValidator CreateValidator(Type type, string propertyName)
 {
     return(new RequiredValidator(Validator.GetPropertyInfo(type, propertyName)));
 }
Exemplo n.º 5
0
 public static CompareValidator CreateValidator(Type type, string errorMessage, string propertyName, ComparableOperator comparisonOperator, object valueToCompare)
 {
     return(new CompareValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), comparisonOperator, valueToCompare));
 }
 public static NotEmptyValidator CreateValidator(Type type, string propertyName)
 {
     return(new NotEmptyValidator(Validator.GetPropertyInfo(type, propertyName)));
 }
 public static LengthValidator CreateValidator(Type type, string errorMessage, string propertyName, uint minLength, uint maxLength)
 {
     return(new LengthValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), minLength, maxLength));
 }
Exemplo n.º 8
0
 public static RangeValidator CreateValidator(Type type, string errorMessage, string propertyName, object minValue, object maxValue)
 {
     return(new RangeValidator(errorMessage, Validator.GetPropertyInfo(type, propertyName), minValue, maxValue));
 }