Validot icon indicating copy to clipboard operation
Validot copied to clipboard

WithFailFastStrategy - fail fast, but only in the related scope

Open bartoszlenar opened this issue 5 years ago • 0 comments

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 FailFast to true in the ValidationContext class, but let's investigate that further.

bartoszlenar avatar Jun 11 '20 16:06 bartoszlenar