Sunmeat.Guard
1.0.0
dotnet add package Sunmeat.Guard --version 1.0.0
NuGet\Install-Package Sunmeat.Guard -Version 1.0.0
<PackageReference Include="Sunmeat.Guard" Version="1.0.0" />
<PackageVersion Include="Sunmeat.Guard" Version="1.0.0" />
<PackageReference Include="Sunmeat.Guard" />
paket add Sunmeat.Guard --version 1.0.0
#r "nuget: Sunmeat.Guard, 1.0.0"
#:package Sunmeat.Guard@1.0.0
#addin nuget:?package=Sunmeat.Guard&version=1.0.0
#tool nuget:?package=Sunmeat.Guard&version=1.0.0

Sunmeat.Guard
Validate everything. Complicate nothing.
Guard validates arguments, objects, collections, text, numbers, files, and documents through one API for .NET.
Install
Version 1.0.0 is prepared for release. Before publication, build and install it from a local feed. Build and publish
After publication on NuGet.org, install that version using the .NET CLI.
dotnet add package Sunmeat.Guard --version 1.0.0
Guard targets .NET 8, 9, 10, and 11. See the platform matrix for verified runtimes. Compatibility
Quick start
Guard clauses
using Sunmeat.Guard;
string name = Guard.NotWhiteSpace("Ada");
int age = Guard.InRange(32, 18, 120);
Boolean checks
using Sunmeat.Guard;
bool canContinue = Guard.IsEmail("user@example.org") && Guard.IsPhone("+12025550123");
Fluent validation
using Sunmeat.Guard;
var validator = Guard.For<Registration>()
.Rule(x => x.Name).NotWhiteSpace().MinLength(2)
.Rule(x => x.Email).Email()
.Rule(x => x.Age).Between(18, 120)
.Build();
var result = validator.Validate(new Registration("Ada", "user@example.org", 32));
Console.WriteLine(result.ToText());
record Registration(string? Name, string? Email, int Age);
Validation rules
The core covers null and empty values, Unicode text, generic numbers, dates, collections, enumerations, passwords, web addresses, international identifiers, file signatures, JSON, and XML. Fluent rules support conditions, nested models, custom checks, and cancellation. Results can use English or Ukrainian and are available as JSON, text, Markdown, and HTML.
Built-in rule catalog · Fluent validation · Security
Optional packages
| Package | Use |
|---|---|
Sunmeat.Guard.Documents |
YAML, TOML, CBOR, and XML Schema |
Sunmeat.Guard.AspNetCore |
Endpoint filters and Problem Details |
Sunmeat.Guard.Blazor |
EditContext form validation |
Sunmeat.Guard.Prism |
Export reports in six formats |
Sunmeat.Guard.Pulse |
Structured counts and terminal reports |
Documentation and examples
Getting started and examples · Measured benchmarks · Localization
Sunmeat ecosystem
| Library | Purpose |
|---|---|
| Sunmeat.Prism | Serialization in six formats |
| Sunmeat.Pulse | Structured logs, terminal output, and event pipelines |
| Sunmeat.Guard | Argument checks and reusable validators |
❤️ Support the project
Sunmeat.Guard is free, open-source software created and maintained by an independent developer.
If Guard saves you time, simplifies validation, or becomes a valuable part of your projects, consider supporting its continued development.
Your support helps fund:
- New validation rules and supported data formats.
- Performance improvements and optimizations.
- Localization and international standards support.
- Documentation, examples, and automated tests.
- Long-term maintenance and compatibility.
- New open-source .NET libraries and developer tools.
Every contribution, regardless of its size, makes a difference.
You can also support the project by starring the repository, reporting issues, contributing code, or sharing Guard with other developers.
Built with curiosity. Shared with the community.
Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 90 | 11/29/2026 |
Initial release of Sunmeat.Guard.