Soenneker.Quark.Gen.Validation
11.0.84
Prefix Reserved
dotnet add package Soenneker.Quark.Gen.Validation --version 11.0.84
NuGet\Install-Package Soenneker.Quark.Gen.Validation -Version 11.0.84
<PackageReference Include="Soenneker.Quark.Gen.Validation" Version="11.0.84"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Soenneker.Quark.Gen.Validation" Version="11.0.84" />
<PackageReference Include="Soenneker.Quark.Gen.Validation"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Soenneker.Quark.Gen.Validation --version 11.0.84
#r "nuget: Soenneker.Quark.Gen.Validation, 11.0.84"
#:package Soenneker.Quark.Gen.Validation@11.0.84
#addin nuget:?package=Soenneker.Quark.Gen.Validation&version=11.0.84
#tool nuget:?package=Soenneker.Quark.Gen.Validation&version=11.0.84
Soenneker.Quark.Gen.Validation
External build-time validation code generation for AOT-compatible Quark applications.
Installation
dotnet add package Soenneker.Quark.Gen.Validation
MSBuild runs the external .NET executable before compilation. It discovers property validation attributes in C# and Razor models and emits implementations of Quark's IGeneratedQuarkValidation. No Roslyn analyzer or compiler dependency is added to the application runtime.
Models and their containing types must be partial. Models with validation attributes are discovered automatically; use [GenerateQuarkValidation] for models without attributes. Reference the generator in the project defining each model. Quark Suite forwards the build dependency to consumers.
public sealed partial class Registration
{
[Required]
public string? Password { get; set; }
[QuarkCompare(nameof(Password))]
public string? Confirmation { get; set; }
[QuarkRange(typeof(decimal), "0", "100", ParseLimitsInInvariantCulture = true)]
public decimal Amount { get; set; }
}
Generated validation reads the current model property and preserves required-first evaluation, display names, resource messages, inherited attributes, and custom validation attributes. It validates fields, not whole objects: model attributes and IValidatableObject are not invoked, matching Quark Suite. Delegates, async validators, pattern validation, and component state remain owned by Suite.
Standard Compare and typed Range are supported, but .NET annotates their constructors as trimming-unsafe, including their original attribute declarations. QuarkCompare and QuarkRange avoid those declarations for strict AOT builds. They are generator-only attributes, not inputs to the framework's reflection-based Validator. Custom attributes, validation methods, and converters must themselves be AOT-compatible. Runtime TypeDescriptor provider registration cannot change generated metadata.
Set ValidationBuildEnabled=false to disable generation. ValidationBuildTasksDllPath can point to a locally built executable assembly. Output lives under obj/<configuration>/<framework>/QuarkValidation; unchanged generated files are not rewritten. Referenced model assemblies must generate their own validators, or register a typed adapter through GeneratedValidationRegistry.Register<T>.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Quark.Gen.Validation:
| Package | Downloads |
|---|---|
|
Soenneker.Quark.Suite
Shadcn-powered Blazor UI, refined and modular. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.84 | 51 | 11/14/2026 |
| 11.0.83 | 1,436 | 11/11/2026 |
| 11.0.81 | 328 | 11/11/2026 |
| 11.0.80 | 93 | 11/11/2026 |
| 11.0.78 | 189 | 11/11/2026 |
| 11.0.77 | 45 | 11/11/2026 |
| 11.0.76 | 208 | 11/11/2026 |
| 11.0.75 | 72 | 11/11/2026 |
| 11.0.73 | 72 | 11/11/2026 |
| 11.0.72 | 3,460 | 11/3/2026 |
| 11.0.71 | 94 | 11/3/2026 |
| 11.0.70 | 232 | 11/3/2026 |
| 11.0.69 | 432 | 11/3/2026 |
| 11.0.68 | 212 | 11/3/2026 |
| 11.0.67 | 256 | 11/2/2026 |
| 11.0.63 | 1,961 | 10/29/2026 |
| 11.0.62 | 1,222 | 10/27/2026 |
| 11.0.59 | 488 | 10/27/2026 |
| 11.0.58 | 168 | 10/26/2026 |
| 11.0.57 | 249 | 10/26/2026 |
Update dependency Microsoft.CodeAnalysis.CSharp to 5.12.0 (#73)