Skip to main content

RulesetValidatorSelector

Selects validators that belong to the specified rulesets.

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

Properties

RuleSets

Rule sets

View Source
Declaration
public string[] RuleSets { get; }

Fields

DefaultRuleSetName

View Source
Declaration
public const string DefaultRuleSetName = "default"

WildcardRuleSetName

View Source
Declaration
public const string WildcardRuleSetName = "*"

Methods

CanExecute(IValidationRule, String, IValidationContext)

Determines whether or not a rule should execute.

View Source
Declaration
public virtual 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

|

IsIncludeRule(IValidationRule)

Checks if the rule is an IncludeRule

View Source
Declaration
protected bool IsIncludeRule(IValidationRule rule)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.FluentValidation.IValidationRulerule

Implements