Validot
Validot copied to clipboard
WithFailFastStrategy - fail fast, but only in the related scope
Feature description
- Ability to set the fail-fast strategy in a single scope.
Feature in action
Specification<Model> specification = s => s
.Member(m => m.Member, memberSpecification).WithFailFastStrategy();
Specification<Model> specification = s => s
.AsModel(anotherSpecification).WithFailFastStrategy();
Feature details
- New parameter command:
WithFailFastStrategy. - The related scope command would terminate and return error output immediately after detecting a single error.
- Internally it looks like temporary setting
FailFasttotruein the ValidationContext class, but let's investigate that further.