Workleap.ComponentModel.DataAnnotations 1.5.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. 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.
paket add Workleap.ComponentModel.DataAnnotations --version 1.5.1
#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.
// Install Workleap.ComponentModel.DataAnnotations as a Cake Addin
#addin nuget:?package=Workleap.ComponentModel.DataAnnotations&version=1.5.1

// Install Workleap.ComponentModel.DataAnnotations as a Cake Tool
#tool nuget:?package=Workleap.ComponentModel.DataAnnotations&version=1.5.1

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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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 Workleap.ComponentModel.DataAnnotations:

Package Downloads
Workleap.Extensions.Mongo.Abstractions The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

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.2-preview.1 31 6/14/2024
1.5.1 1,665 6/4/2024
1.5.1-preview.1 37 6/4/2024
1.4.1-preview.14 42 5/31/2024
1.4.1-preview.13 40 5/31/2024
1.4.1-preview.12 41 5/21/2024
1.4.1-preview.11 53 5/10/2024
1.4.1-preview.10 31 5/3/2024
1.4.1-preview.9 55 4/15/2024
1.4.1-preview.8 56 4/12/2024
1.4.1-preview.7 54 4/3/2024
1.4.1-preview.6 42 4/3/2024
1.4.1-preview.5 48 3/8/2024
1.4.1-preview.4 52 3/7/2024
1.4.1-preview.3 64 3/4/2024
1.4.1-preview.2 49 3/4/2024
1.4.1-preview.1 61 3/1/2024
1.4.0 30,681 2/29/2024
1.3.2-preview.3 45 2/29/2024
1.3.2-preview.2 48 2/16/2024
1.3.2-preview.1 55 2/15/2024
1.3.1 17,349 2/13/2024
1.3.1-preview.9 49 2/13/2024
1.3.1-preview.8 46 2/6/2024
1.3.1-preview.7 43 2/6/2024
1.3.1-preview.6 49 1/22/2024
1.3.1-preview.5 55 1/12/2024
1.3.1-preview.4 49 1/12/2024
1.3.1-preview.3 42 1/12/2024
1.3.1-preview.2 66 12/18/2023
1.3.1-preview.1 81 11/26/2023
1.3.0 51,154 11/17/2023
1.2.1-preview.5 58 11/17/2023
1.2.1-preview.4 52 11/17/2023
1.2.1-preview.3 55 11/13/2023
1.2.1-preview.2 55 11/7/2023
1.2.0 31,021 10/31/2023
1.1.1 26,275 7/20/2023