Class IsRegexMatchedValidator<TResult>
- Namespace
- LfrlAnvil.Validation.Validators
- Assembly
- LfrlAnvil.Validation.dll
public sealed class IsRegexMatchedValidator<TResult> : IValidator<string, TResult>
Type Parameters
TResult
Result type.
- Inheritance
-
IsRegexMatchedValidator<TResult>
- Implements
-
IValidator<string, TResult>
- Inherited Members
- Extension Methods
Constructors
IsRegexMatchedValidator(Regex, TResult)
Creates a new IsRegexMatchedValidator<TResult> instance.
public IsRegexMatchedValidator(Regex regex, TResult failureResult)
Parameters
regex
RegexRegex to match.
failureResult
TResultFailure result.
Properties
FailureResult
Failure result.
public TResult FailureResult { get; }
Property Value
- TResult
Regex
Regex to match.
public Regex Regex { get; }
Property Value
Methods
Validate(string)
Validates the provided obj
.
[Pure]
public Chain<TResult> Validate(string obj)
Parameters
obj
stringObject to validate.
Returns
- Chain<TResult>
Result of
obj
validation.