CascadeMode.StopOnFirstFailure why is going to be removed?
See original GitHub issueHi,
My FluentValidation ver. is 9.1.3 for .NET Core
Why are you going to remove CascadeMode.StopOnFirstFailure completely? As I read:
https://docs.fluentvalidation.net/en/latest/conditions.html#stop-vs-stoponfirstfailure the behaviour of CascadeMode.Stop is completely different and I want to stop validation for a particular rule chain, nor for all next rules. If you remove StopOnFirstFailure I wouldn’t have such possibility…Maybe better is to leave both options in future? Or you can advise me how to achieve my goal using Stop?
RuleFor(x => x.Surname).Cascade(CascadeMode.StopOnFirstFailure).NotNull().NotEqual("foo"); RuleFor(x => x.Forename).Cascade(CascadeMode.StopOnFirstFailure).NotNull().NotEqual("foo")
When I change to Stop then if any Surname chain rule fails it will not check Forename at all - I want to stop only in particular chain rule (as it was in the example code). Is it possible?!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
The feature is not being removed. It will continue to work in 10.0, and will generate a warning, just as it does now.
Hi, You’re right, I misunderstood the changes. Now it seems to be clear for me. Thank you for your help!