Class ForNullableStructValidator<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 ForNullableStructValidator<T, TResult> : IValidator<T?, TResult> where T : struct
Type Parameters
T
Object type.
TResult
Result type.
- Inheritance
-
ForNullableStructValidator<T, TResult>
- Implements
-
IValidator<T?, TResult>
- Inherited Members
- Extension Methods
Constructors
ForNullableStructValidator(IValidator<T, TResult>)
Creates a new ForNullableStructValidator<T, TResult> instance.
public ForNullableStructValidator(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
T?Object to validate.
Returns
- Chain<TResult>
Result of
obj
validation.