8000 WithSeverity - support for errors severity level · Issue #4 · bartoszlenar/Validot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.
This repository was archived by the owner on May 26, 2025. It is now read-only.
WithSeverity - support for errors severity level #4
Closed
@bartoszlenar

Description

@bartoszlenar

Feature description

  • Add severity support to error output.
    • I'm not sure if it's needed... Maybe it's bringing to much complexity into something that should be fairly simple.
  • Severities could be replaced with... multiple validators.

Feature in action

Specification<string> specification = s => s
    .NotEmpty().WithSeverity(10)
    .NotWhitespace().WithSeverity(0)
Specification<string> specification = s => s
    .NotEmpty().WithSeverity(Severity.High)
    .NotWhitespace().WithSeverity(Severity.Low)
result.AnyErrorsWithSeverity(Severity.High);

result.AnyErrorsWithSeverity(10);

result.GetMessageMapWithSeverity(Severity.Medium | Severity.High)

Feature details

  • New parameter command: WithSeverity.
  • Would be marking the entire error output with a severity level.
  • Result would have methods to filter out error outputs that have certain level of severity...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestwontfixThis will not be worked on

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0