fix(validation): guard null comparison bounds in comparison builders

Passing a null bound to GreaterThan/LessThan/Between etc. called
value.CompareTo(null), throwing NullReferenceException for non-null
reference-type values. Short-circuit when the bound is null so the rule is
satisfied instead of crashing.
This commit is contained in:
Louis Seubert 2026-07-12 18:42:07 +02:00
commit fd6ed64755
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
4 changed files with 92 additions and 5 deletions

View file

@ -51,6 +51,7 @@ To have a consistent experience across all packages, some public interfaces have
- **request.result:** Correct the namespace in the `Prelude` doc comment (`Geekeey.Extensions.Result``Geekeey.Request.Result`)
- **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`)
### Removed