Skip to main content

MemberNameValidatorSelector

Selects validators that are associated with a particular property.

Assembly: ServiceStack.dll
View Source
Declaration
public class MemberNameValidatorSelector : IValidatorSelector

Properties

MemberNames

Member names that are validated.

View Source
Declaration
public IEnumerable<string> MemberNames { get; }

Methods

CanExecute(IValidationRule, String, IValidationContext)

Determines whether or not a rule should execute.

View Source
Declaration
public bool CanExecute(IValidationRule rule, string propertyPath, IValidationContext context)
Returns

System.Boolean: Whether or not the validator can execute.

Parameters
TypeNameDescription
ServiceStack.FluentValidation.IValidationRuleruleThe rule

| | System.String | propertyPath | Property path (eg Customer.Address.Line1)

| | ServiceStack.FluentValidation.IValidationContext | context | Contextual information

|

FromExpressions<T>(Expression<Func<T, Object>>[])

Creates a MemberNameValidatorSelector from a collection of expressions.

View Source
Declaration
[Obsolete("This method will be removed from FluentValidation in 10.0")]
public static MemberNameValidatorSelector FromExpressions<T>(params Expression<Func<T, object>>[] propertyExpressions)
Returns

ServiceStack.FluentValidation.Internal.MemberNameValidatorSelector

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>[]propertyExpressions
Type Parameters
  • T

MemberNamesFromExpressions<T>(Expression<Func<T, Object>>[])

Gets member names from expressions

View Source
Declaration
public static string[] MemberNamesFromExpressions<T>(params Expression<Func<T, object>>[] propertyExpressions)
Returns

System.String[]

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>[]propertyExpressions
Type Parameters
  • T

Implements