Class AndCompositeValidator<T, TResult>
- Namespace
- LfrlAnvil.Validation.Validators
- Assembly
- LfrlAnvil.Validation.dll
Represents a collection of generic object validators where each validator is invoked and their results are concatenated together.
public sealed class AndCompositeValidator<T, TResult> : IValidator<T, TResult>
Type Parameters
TObject type.
TResultResult type.
- Inheritance
-
AndCompositeValidator<T, TResult>
- Implements
-
IValidator<T, TResult>
- Inherited Members
- Extension Methods
Constructors
AndCompositeValidator(IReadOnlyList<IValidator<T, TResult>>)
Creates a new AndCompositeValidator<T, TResult> instance.
public AndCompositeValidator(IReadOnlyList<IValidator<T, TResult>> validators)
Parameters
validatorsIReadOnlyList<IValidator<T, TResult>>Underlying validators.
Properties
Validators
Underlying validators.
public IReadOnlyList<IValidator<T, TResult>> Validators { get; }
Property Value
- IReadOnlyList<IValidator<T, TResult>>
Methods
Validate(T)
Validates the provided obj.
[Pure]
public Chain<TResult> Validate(T obj)
Parameters
objTObject to validate.
Returns
- Chain<TResult>
Result of
objvalidation.