Table of Contents

Class FluentValidatorCollection<T>

Namespace
MADE.Data.Validation
Assembly
MADE.Data.Validation.FluentValidation.dll

Defines a list of FluentValidation.IValidator objects that can be accessed by index.

public class FluentValidatorCollection<T> : List<IValidator<T>>, IList<IValidator<T>>, ICollection<IValidator<T>>, IReadOnlyList<IValidator<T>>, IReadOnlyCollection<IValidator<T>>, IEnumerable<IValidator<T>>, IValidatorCollection, IList, ICollection, IEnumerable

Type Parameters

T

The type of item being validated.

Inheritance
List<IValidator<T>>
FluentValidatorCollection<T>
Implements
IList<IValidator<T>>
ICollection<IValidator<T>>
IReadOnlyList<IValidator<T>>
IReadOnlyCollection<IValidator<T>>
IEnumerable<IValidator<T>>
Inherited Members
Extension Methods

Constructors

FluentValidatorCollection()

Initializes a new instance of the FluentValidatorCollection<T> class that is empty and has the default initial capacity.

public FluentValidatorCollection()

FluentValidatorCollection(IEnumerable<IValidator<T>>)

Initializes a new instance of the FluentValidatorCollection<T> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.

public FluentValidatorCollection(IEnumerable<IValidator<T>> collection)

Parameters

collection IEnumerable<IValidator<T>>

The collection whose elements are copied to the new list.

Exceptions

ArgumentNullException

collection is null.

FluentValidatorCollection(int)

Initializes a new instance of the FluentValidatorCollection<T> class that is empty and has the specified initial capacity.

public FluentValidatorCollection(int capacity)

Parameters

capacity int

The number of elements that the new list can initially store.

Exceptions

ArgumentOutOfRangeException

capacity is less than 0.

Properties

FeedbackMessages

Gets the validator feedback messages for ones which are invalid.

public IEnumerable<string> FeedbackMessages { get; }

Property Value

IEnumerable<string>

IsDirty

Gets or sets a value indicating whether the data is dirty.

public bool IsDirty { get; set; }

Property Value

bool

IsInvalid

Gets or sets a value indicating whether the data provided is in an invalid state.

public bool IsInvalid { get; set; }

Property Value

bool

Methods

Validate(object)

Executes data validation on the provided value against the validators provided.

public void Validate(object value)

Parameters

value object

The value to be validated.

Exceptions

Exception

Potentially thrown by the Validated delegate callback.

Events

Validated

Occurs when the input value is validated against the collection of validators.

public event InputValidatedEventHandler? Validated

Event Type

InputValidatedEventHandler