Issue 497 · Week of Jul 13, 2026
Feed Jobs Search Platform About Donate
← Back to feed / //dotnet

Zero-Code Validations in Your .NET API

Read full article Discuss
The author of the kalandra.tech blog examines a common .NET pitfall: the same validation rule ends up being checked three times — in the request's data annotations, in the controller, and in the service with business logic — which easily leads to bugs when the checks drift out of sync. As a fix, he applies the functional "parse, don't validate" principle: a value is converted once into a type that cannot represent an invalid state, and the compiler enforces correctness everywhere downstream. To that end he built the Kalicz.StrongTypes package — a set of strong C# types such as Email, NonEmptyString, and Positive, plus Result and Maybe. Once installed, the types let you remove manual checks from your code, leaving data parsing at the API boundary.