Table of Contents

Class FailingValidator<T, TResult>

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

Represents a generic object validator that always fails.

public sealed class FailingValidator<T, TResult> : IValidator<T, TResult>

Type Parameters

T

Object type.

TResult

Result type.

Inheritance
FailingValidator<T, TResult>
Implements
IValidator<T, TResult>
Inherited Members
Extension Methods

Constructors

FailingValidator(TResult)

Creates a new FailingValidator<T, TResult> instance.

public FailingValidator(TResult failureResult)

Parameters

failureResult TResult

Failure result.

Properties

FailureResult

Failure result.

public TResult FailureResult { get; }

Property Value

TResult

Methods

Validate(T)

Validates the provided obj.

[Pure]
public Chain<TResult> Validate(T obj)

Parameters

obj T

Object to validate.

Returns

Chain<TResult>

Result of obj validation.