TooManyDataAnnotations.Aot 1.0.1

dotnet add package TooManyDataAnnotations.Aot --version 1.0.1
                    
NuGet\Install-Package TooManyDataAnnotations.Aot -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TooManyDataAnnotations.Aot" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TooManyDataAnnotations.Aot" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="TooManyDataAnnotations.Aot" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TooManyDataAnnotations.Aot --version 1.0.1
                    
#r "nuget: TooManyDataAnnotations.Aot, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TooManyDataAnnotations.Aot@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TooManyDataAnnotations.Aot&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=TooManyDataAnnotations.Aot&version=1.0.1
                    
Install as a Cake Tool

TooManyDataAnnotations.Aot

TooManyDataAnnotations.Aot Icon

Native AOT-compatible subset of TooManyDataAnnotations. Zero reflection.

NuGet .NET Native AOT


⚠️ Early adopters wanted. Newly published, seeking real-world feedback. 899 tests covering edge cases. Report issues here.

🎯 What This Package Is

This is a subset of TooManyDataAnnotations that contains only AOT-safe validators — attributes that don't use reflection.

Use this when publishing Native AOT applications:

dotnet publish -c Release -r win-x64

✨ Included Validators

All 14 attributes below are zero-reflection and fully trim-safe:

Category Attributes
Identifiers [Guid], [GuidV7], [Uri]
Network [IPv4], [IPv6], [MacAddress], [PortNumber]
Text [HexColor], [Slug], [WebUrl]
Formatting [IsoDateTime], [SemanticVersion]
Logical [IsTrue], [IsFalse]

❌ Not Included (Reflection-Based)

These validators require System.Reflection and are NOT in this package:

  • [MinimumTrueValues], [AtLeastOneTrue], [ExactlyNTrue], [ExactlyOneTrue]
  • [ExactlyNOf], [ExactlyOneOf], [RequiredAtLeastN], [RequiredAtLeastOne]
  • [StartDate], [EndDate]

If you need these, install the full package instead:

dotnet add package TooManyDataAnnotations

🔍 Verified AOT Compatible

This library was tested with Native AOT publishing — zero warnings, zero trimming issues:

cd TooManyDataAnnotations.SampleApi.Aot
dotnet publish -c Release

Output:

TooManyDataAnnotations.Aot net10.0 done (2.7s)
TooManyDataAnnotations.SampleApi.Aot net10.0 win-x64 done (40.7s)
Build succeeded in 44.6s

🚀 Quick Start

dotnet add package TooManyDataAnnotations.Aot
using TooManyDataAnnotations.Aot.Network;
using TooManyDataAnnotations.Aot.Formatting;
using TooManyDataAnnotations.Aot.Text;

public class ConfigDto
{
    [IPv4(AllowedScopes = IPv4Scope.Public)]
    public string? ApiServer { get; set; }

    [SemanticVersion]
    public string? AssemblyVersion { get; set; }

    [HexColor]
    public string? PrimaryColor { get; set; }
}

📦 Full Feature Set

For the complete validator library (including reflection-based validators), see:


📄 License

MIT License — Copyright © 2026 LuisAlfredo92

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TooManyDataAnnotations.Aot:

Package Downloads
TooManyDataAnnotations

Extends System.ComponentModel.DataAnnotations with validators for formats the native framework doesn't cover — IPv4/IPv6, SemVer, MAC addresses, GUIDs, URLs, port numbers, dates, conditional boolean validation, property count constraints, and more. Full feature set including reflection-based attributes. Performance-oriented, extensively tested, zero dependencies

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 129 8/2/2026
1.0.0 103 7/29/2026