public static FluentValidation.IRuleBuilderOptions <T, TProperty> StringMatches <T, TProperty>(this FluentValidation.IRuleBuilder <T, TProperty> ruleBuilder, string expression) { if (typeof(TProperty) == typeof(string)) { return(ruleBuilder.SetValidator(new RegularExpressionValidator(expression))); } return(ruleBuilder.SetValidator(new ObjectRegularExpressionValidator(expression))); }
public static FluentValidation.IRuleBuilderOptions <T, TProperty> StringContainsWhiteSpace <T, TProperty>(this FluentValidation.IRuleBuilder <T, TProperty> ruleBuilder) { return(ruleBuilder.SetValidator(new StringContainsWhiteSpaceValidator())); }
public static FluentValidation.IRuleBuilderOptions <T, EmailAddress> EmailAddress <T>(this FluentValidation.IRuleBuilder <T, EmailAddress> ruleBuilder) { return(ruleBuilder.SetValidator(new EmailAddress.Validator())); }