Skip to content

Commit

Permalink
Use FluentValidation Stop instead of StopOnFirstFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpmorris committed May 1, 2021
1 parent e6b2bdb commit 960b1e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class PersonValidator : AbstractValidator<Person>
public PersonValidator()
{
RuleFor(x => x.Salutation)
.Cascade(CascadeMode.StopOnFirstFailure)
.Cascade(CascadeMode.Stop)
.NotEmpty()
.MustAsync(LongRunningAsyncMethod).WithMessage("Cannot be DR");
RuleFor(x => x.GivenName).NotEmpty();
Expand Down

0 comments on commit 960b1e2

Please sign in to comment.