Soenneker.Attributes.Validation.Guid.Nullable 11.0.278

Prefix Reserved
dotnet add package Soenneker.Attributes.Validation.Guid.Nullable --version 11.0.278
                    
NuGet\Install-Package Soenneker.Attributes.Validation.Guid.Nullable -Version 11.0.278
                    
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="Soenneker.Attributes.Validation.Guid.Nullable" Version="11.0.278" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Attributes.Validation.Guid.Nullable" Version="11.0.278" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Attributes.Validation.Guid.Nullable" />
                    
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 Soenneker.Attributes.Validation.Guid.Nullable --version 11.0.278
                    
#r "nuget: Soenneker.Attributes.Validation.Guid.Nullable, 11.0.278"
                    
#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 Soenneker.Attributes.Validation.Guid.Nullable@11.0.278
                    
#: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=Soenneker.Attributes.Validation.Guid.Nullable&version=11.0.278
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Attributes.Validation.Guid.Nullable&version=11.0.278
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Attributes.Validation.Guid.Nullable

A DataAnnotations validator for an optional string that, when supplied, must contain a non-empty GUID.

Installation

dotnet add package Soenneker.Attributes.Validation.Guid.Nullable

Usage

using Soenneker.Attributes.Validation.Guid.Nullable;

public sealed class SearchRequest
{
    [NullableGuidValidation]
    public string? OwnerId { get; init; }
}

The attribute participates in normal DataAnnotations and ASP.NET Core model validation.

Validation rules

Value Result
null Valid
A parseable, non-empty GUID string Valid
Malformed or blank string Invalid
00000000-0000-0000-0000-000000000000 Invalid
A non-string value Invalid

This validator treats only null as absent; an empty string is not a valid GUID. Use Soenneker.Attributes.Validation.Guid when the value is required.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Attributes.Validation.Guid.Nullable:

Package Downloads
Soenneker.Requests.Entity

A record request type for Entity objects

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.278 158 11/11/2026
11.0.277 41 11/11/2026
11.0.276 81 11/11/2026
11.0.275 66 11/11/2026
11.0.274 101 11/11/2026
11.0.273 98 11/11/2026
11.0.272 111 11/11/2026
11.0.271 387 11/3/2026
11.0.270 134 11/3/2026
11.0.269 138 11/3/2026
11.0.268 167 11/2/2026
11.0.267 219 10/26/2026
4.0.266 989 10/15/2026
4.0.265 102 10/15/2026
4.0.264 124 10/14/2026
4.0.263 207 10/14/2026
4.0.262 97 10/14/2026
4.0.261 102 10/14/2026
4.0.255 183 10/13/2026
4.0.254 103 10/12/2026
Loading failed

Updated Multiple NuGet packages