OrionGuard 5.0.1
dotnet add package OrionGuard --version 5.0.1
NuGet\Install-Package OrionGuard -Version 5.0.1
<PackageReference Include="OrionGuard" Version="5.0.1" />
<PackageVersion Include="OrionGuard" Version="5.0.1" />
<PackageReference Include="OrionGuard" />
paket add OrionGuard --version 5.0.1
#r "nuget: OrionGuard, 5.0.1"
#:package OrionGuard@5.0.1
#addin nuget:?package=OrionGuard&version=5.0.1
#tool nuget:?package=OrionGuard&version=5.0.1
OrionGuard v4.0
A modern, fluent, and extensible validation library for .NET.
Installation
dotnet add package OrionGuard
Quick Start
using Moongazing.OrionGuard.Core;
Ensure.That(email).NotNull().Email();
License
MIT License
| 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 was computed. 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. |
-
net8.0
-
net9.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v5.0.1 — Release Notes
NEW: Security Guards — SQL injection, XSS, path traversal, command injection, LDAP injection, XXE detection, unsafe filename, and open redirect validation. All patterns use FrozenSet for O(1) lookups.
NEW: Format Guards (replaces TurkishGuards) — Geographic coordinates, MAC address, hostname (RFC 1123), CIDR notation, ISO 3166-1 country codes, IANA time zones, BCP 47 language tags, JWT structure, connection strings, and Base64 validation.
NEW: ThrowHelper Pattern — All hot-path guards delegate throwing to a centralized ThrowHelper with [DoesNotReturn] and [StackTraceHidden] for smaller JIT-compiled method bodies and cleaner stack traces.
NEW: Span-Based FastGuard — Email, ASCII, AlphaNumeric, NumericString, MaxLength, ValidGuid, and Finite validators using ReadOnlySpan with zero allocations.
IMPROVED: Thread-Safe Localization — Rewritten with ConcurrentDictionary and AsyncLocal. Now supports 8 languages: EN, TR, DE, FR, ES, PT, AR, JA. Per-request culture scoping via SetCultureForCurrentScope.
IMPROVED: ObjectValidator — Compiled expression caching, CrossProperty validation, conditional When() blocks.
IMPROVED: FluentGuard — Transform() and Default() pipeline methods. All date comparisons use DateTime.UtcNow.
IMPROVED: All exceptions are sealed with ErrorCode and ParameterName properties.
IMPROVED: RegexCache with bounded size (1000), FrozenSet for BusinessGuards currency codes, ICollection.Count optimization in CollectionGuards.
FIXED: AgainstNotAllLowercase was comparing string to itself (always passed).
FIXED: AgainstEmptyCollection was throwing EmptyStringException instead of NullValueException.
FIXED: GuardBuilderExtensions was passing .Value instead of .ParameterName.
BREAKING: Validate.Object renamed to Validate.For. FastGuard.Guid renamed to FastGuard.ValidGuid. TurkishGuards removed.
Full changelog: https://github.com/Moongazing/OrionGuard/blob/master/CHANGELOG.md