fix(validation): make Severity meaningful in Validation.IsValid
Validation.IsValid previously counted every problem regardless of severity, leaving Severity inert. Now IsValid only fails on Error problems, so Warning and Info no longer invalidate the result, and IsValidFor(Severity) lets callers set the failing-severity threshold.
This commit is contained in:
parent
581b0a1ced
commit
15bf9a8e56
4 changed files with 75 additions and 3 deletions
|
|
@ -53,6 +53,7 @@ To have a consistent experience across all packages, some public interfaces have
|
|||
- **request.result:** Fold `IsSuccess` into `Result<T>.GetHashCode` to avoid collisions between a failure and a success value whose hash is `0`
|
||||
- **request.validation:** Guard null comparison bounds in `GreaterThan`/`LessThan`/`Between` etc. so a `null` bound no longer throws (`NullReferenceException`)
|
||||
- **request.validation:** Return no problems when validating a `null` instance of a reference type instead of dereferencing it (`NullReferenceException`)
|
||||
- **request.validation:** Make `Severity` meaningful — `Validation.IsValid` now only fails on `Error` problems; `Warning`/`Info` no longer invalidate. Added `Validation.IsValidFor(Severity)` to set the failing-severity threshold
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue