Table of Contents

Class OrCompositeValidator<T, TResult>

Namespace
LfrlAnvil.Validation.Validators
Assembly
LfrlAnvil.Validation.dll

Represents a collection of generic object validators that returns an empty result if any of the underlying validators returns an empty result.

public sealed class OrCompositeValidator<T, TResult> : IValidator<T, OrValidatorResult<TResult>>

Type Parameters

T

Object type.

TResult

Result type.

Inheritance
OrCompositeValidator<T, TResult>
Implements
Inherited Members
Extension Methods

Constructors

OrCompositeValidator(IReadOnlyList<IValidator<T, TResult>>)

Creates a new OrCompositeValidator<T, TResult> instance.

public OrCompositeValidator(IReadOnlyList<IValidator<T, TResult>> validators)

Parameters

validators IReadOnlyList<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<OrValidatorResult<TResult>> Validate(T obj)

Parameters

obj T

Object to validate.

Returns

Chain<OrValidatorResult<TResult>>

Result of obj validation.