VOOZH about

URL: https://www.nuget.org/packages/Workleap.ComponentModel.DataAnnotations/

⇱ NuGet Gallery | Workleap.ComponentModel.DataAnnotations 1.5.1




Workleap.ComponentModel.DataAnnotations 1.5.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Workleap.ComponentModel.DataAnnotations --version 1.5.1
 
 
NuGet\Install-Package Workleap.ComponentModel.DataAnnotations -Version 1.5.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="Workleap.ComponentModel.DataAnnotations" Version="1.5.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Workleap.ComponentModel.DataAnnotations" Version="1.5.1" />
 
Directory.Packages.props
<PackageReference Include="Workleap.ComponentModel.DataAnnotations" />
 
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 Workleap.ComponentModel.DataAnnotations --version 1.5.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Workleap.ComponentModel.DataAnnotations, 1.5.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 Workleap.ComponentModel.DataAnnotations@1.5.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=Workleap.ComponentModel.DataAnnotations&version=1.5.1
 
Install as a Cake Addin
#tool nuget:?package=Workleap.ComponentModel.DataAnnotations&version=1.5.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Workleap.ComponentModel.DataAnnotations

Provides multiple new data annotation attributes, such as [Guid], [NotEmpty], [ValidateProperties].

👁 nuget
👁 build

Getting started

dotnet add package Workleap.ComponentModel.DataAnnotations

Decorate your properties, fields and method parameters with these new data annotation attributes.

Most of them are validation attributes that can be used in model validation. They work the same way as built-in .NET data annotations such as [Required], [Range], [RegularExpression], etc.

The most useful validation attribute here is probably ValidatePropertiesAttribute, as it validates all the properties of an object. This allows in-depth, nested validation of an entire complex object graph.

List of data annotation attributes

Attribute Description
GuidAttribute Validates that a string property is a well-formatted GUID with an optional format
ContainsNonEmptyGuidAttribute Validates that a Guid enumerable property contains at least one non-empty Guid
ContainsNonEmptyStringAttribute Validates that a String enumerable property contains at least one non-empty String
ContainsOnlyNonEmptyGuidsAttribute Validates that a Guid enumerable property contains only non-empty Guids
ContainsOnlyNonEmptyStringsAttribute Validates that a String enumerable property contains only non-empty Strings
NotEmptyAttribute Validates that an enumerable property is not empty
ValidatePropertiesAttribute Validates all properties of a complex type property (nested object validation)
TimeSpanAttribute Validates that a string property is a well-formatted TimeSpan with an optional format
UrlOfKindAttribute Validates that a string or Uri property is a well-formatted url of the specified UriKind
ContainsAttribute Validates that a string contains the specified substring (casing can be specified)
StartsWithAttribute Validates that a string starts with the specified substring (casing can be specified)
EndsWithAttribute Validates that a string ends with the specified substring (casing can be specified)
ProvidedByAzureKeyVaultAttribute Indicates that a property value might be loaded from Azure Key Vault (has no effect)
ProvidedByAzureAppConfigAttribute Indicates that a property value might be loaded from Azure App Configuration (has no effect)
SensitiveInformationAttribute Indicates that a property contains sensitive information, such as personally identifiable information (PII), or any other information that might result in loss of an advantage or level of security if disclosed to others (has no effect)
NonSensitiveInformationAttribute Indicates that a property does not contain sensitive information (has no effect)

License

Copyright © 2022, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 is compatible.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Workleap.ComponentModel.DataAnnotations:

Package Downloads
Workleap.Extensions.Mongo.Abstractions

Provides MongoDB access through .NET dependency injection, following Microsoft.Extensions.* library practices.

Workleap.Extensions.Mongo.Abstractions.v2

Provides MongoDB access through .NET dependency injection, following Microsoft.Extensions.* library practices.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.29-preview.1 187 11/3/2025
1.5.28-preview.1 178 10/27/2025
1.5.27-preview.2 166 10/21/2025
1.5.27-preview.1 170 10/20/2025
1.5.26-preview.2 148 10/17/2025
1.5.26-preview.1 168 10/13/2025
1.5.25-preview.1 176 10/6/2025
1.5.24-preview.1 163 9/29/2025
1.5.23-preview.1 178 9/23/2025
1.5.22-preview.3 223 9/19/2025
1.5.22-preview.2 292 9/17/2025
1.5.22-preview.1 301 9/17/2025
1.5.21-preview.1 163 9/12/2025
1.5.20-preview.1 176 9/2/2025
1.5.19-preview.3 221 8/26/2025
1.5.19-preview.2 188 8/25/2025
1.5.19-preview.1 194 8/25/2025
1.5.18-preview.2 166 8/21/2025
1.5.18-preview.1 178 8/19/2025
1.5.1 379,099 6/4/2024
Loading failed