Table of Contents

Class BaseValidator<T>

Namespace
Innova.Data.Validation
Assembly
Innova.Data.dll

Base class for entity validators.

public abstract class BaseValidator<T> : AbstractValidator<T>, IEnumerable<IValidationRule>, IEnumerable, IEntityValidator<T>, IValidator<T>, IValidator, IEntityValidator

Type Parameters

T

The type of entity being validated.

Inheritance
AbstractValidator<T>
BaseValidator<T>
Implements
IEnumerable<IValidationRule>
IValidator<T>
IValidator
Derived
Extension Methods

Constructors

BaseValidator()

Initializes a new instance of the BaseValidator<T> class.

Properties

DefaultRuleSet

Gets or sets the default ruleset for validation.

DeleteRulesets

Gets or sets the list of rulesets for entity deletion.

IgnoreProperties

Gets or sets the list of properties to ignore during validation.

InsertRulesets

Gets or sets the list of rulesets for entity insertion.

UpdateRulesets

Gets or sets the list of rulesets for entity update.

Methods

AddPropertyToIgnore(string)

Adds the specified property to the list of properties to ignore during validation.

AddPropertyToIgnore<TProperty>(Expression<Func<T, TProperty>>)

Adds the specified property to the list of properties to ignore during validation.

IsPropertyIgnored(string)

Determines whether the specified property is ignored during validation.

IsPropertyIgnored<TProperty>(Expression<Func<T, TProperty>>)

Determines whether the specified property is ignored during validation.

Validate(T, ValidationRuleSetEnum, CancellationToken)

Validates the specified entity using the specified validation ruleset.

ValidateByDefaultRuleset<TEntity>(TEntity)

Validates the specified entity using the default validation ruleset.

ValidateByDefaultRuleset<TEntity>(TEntity, string)

Validates the specified entity property using the default validation ruleset.