Repository navigation
1.0.0 (2026-11-14)
Highlights
A ground-up rewrite for .NET 11 and C# 15 unions. The 0.5 line is retired; the README has a migration table.
Validated<T, TError>is a C# 15 union with exactly two cases,Valid<T>andInvalid<TError>:valid(...)and
invalid(...)convert implicitly, aswitchover both is exhaustive, and an invalid validation is never empty.- Every error, not just the first:
Zip,Combine(2–8),Apply,Sequence,TraverseandCombineAsyncread every
input and collect every error in order. The applicative laws are properties. - Dependent steps when they are needed:
ThenandEnsureshort-circuit on purpose (noBind, noSelectMany). - Any type can be the error;
ValidationError(Property, Message),Validated.CheckandValidated.FromNullablecover
the common cases. No.ValueorIsValid: values come out through pattern matching,MatchorOrDefault. - Async where it pays off:
MatchAsync,MapAsync,ThenAsync, andCombineAsyncfor checks that run as tasks. - Zero allocations on the valid path for value types (checked on every build); trimming and Native AOT compatible; no
dependencies. Requires .NET 11.