Argument validation like: Guard.NotNull, Guard.NotNullOrEmpty, Guard.NotNullOrWhiteSpace, Guard.Condition en Guard.HasNoNulls.
Total Downloads
83.3M
83,258,166
Published
Feb 8, 2026
9mo ago
Get Started
dotnet add package Stef.Validation --version 0.3.0
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard | |
| Other |
README
🛡️ Stef.Validation
Guard methods for argument validation (NotNull, NotEmpty, ...)
Usage example
using Stef.Validation;
public Person(string name, int age)
{
Guard.NotNullOrEmpty(name, nameof(name));
Guard.NotNullOrEmpty(name); // It's also possible to omit the `nameof(...)`-statement because CallerArgumentExpression is used internally.
Guard.Condition(age, a => a > 0, nameof(age));
}
Sponsors
Entity Framework Extensions and Dapper Plus are major sponsors and proud to contribute to the development of Stef.Validation.
Downloads by Version
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 10 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.

