Validating Values
Overview
Methods
Validate
record Hello(string value);
class HelloValidator : AbstractValidator<Hello>
{
public HelloValidator()
{
RuleFor(x => x.value).NotEmpty();
}
}
Hello hello = new("world!");
HelloValidator validator = new();
Result<Hello, ValidationErr> result = hello.Validate(validator);ValidateAsync
Last updated
Was this helpful?