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
TThe 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
collectionIEnumerable<IValidator<T>>The collection whose elements are copied to the new list.
Exceptions
- ArgumentNullException
collectionis 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
capacityintThe number of elements that the new list can initially store.
Exceptions
- ArgumentOutOfRangeException
capacityis less than 0.
Properties
FeedbackMessages
Gets the validator feedback messages for ones which are invalid.
public IEnumerable<string> FeedbackMessages { get; }
Property Value
IsDirty
Gets or sets a value indicating whether the data is dirty.
public bool IsDirty { get; set; }
Property Value
IsInvalid
Gets or sets a value indicating whether the data provided is in an invalid state.
public bool IsInvalid { get; set; }
Property Value
Methods
Validate(object)
Executes data validation on the provided value against the validators provided.
public void Validate(object value)
Parameters
valueobjectThe value to be validated.
Exceptions
Events
Validated
Occurs when the input value is validated against the collection of validators.
public event InputValidatedEventHandler? Validated