Class ForNullableRefValidator<T, TResult>
- Namespace
- LfrlAnvil.Validation.Validators
- Assembly
- LfrlAnvil.Validation.dll
Represents a generic nullable object validator where null objects are considered valid.
public sealed class ForNullableRefValidator<T, TResult> : IValidator<T?, TResult> where T : class
Type Parameters
T
Object type.
TResult
Result type.
- Inheritance
-
ForNullableRefValidator<T, TResult>
- Implements
-
IValidator<T, TResult>
- Inherited Members
- Extension Methods
Constructors
ForNullableRefValidator(IValidator<T, TResult>)
Creates a new ForNullableRefValidator<T, TResult> instance.
public ForNullableRefValidator(IValidator<T, TResult> validator)
Parameters
validator
IValidator<T, TResult>Underlying validator.
Properties
Validator
Underlying validator.
public IValidator<T, TResult> Validator { get; }
Property Value
- IValidator<T, TResult>
Methods
Validate(T?)
Validates the provided obj
.
[Pure]
public Chain<TResult> Validate(T? obj)
Parameters
obj
TObject to validate.
Returns
- Chain<TResult>
Result of
obj
validation.