Workleap.ComponentModel.DataAnnotations 1.2.1-preview.4

Prefix Reserved
This is a prerelease version of Workleap.ComponentModel.DataAnnotations.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Workleap.ComponentModel.DataAnnotations --version 1.2.1-preview.4                
NuGet\Install-Package Workleap.ComponentModel.DataAnnotations -Version 1.2.1-preview.4                
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.2.1-preview.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Workleap.ComponentModel.DataAnnotations --version 1.2.1-preview.4                
#r "nuget: Workleap.ComponentModel.DataAnnotations, 1.2.1-preview.4"                
#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.2.1-preview.4&prerelease

// Install Workleap.ComponentModel.DataAnnotations as a Cake Tool
#tool nuget:?package=Workleap.ComponentModel.DataAnnotations&version=1.2.1-preview.4&prerelease                

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
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

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.23 24 11/29/2024
1.5.2-preview.22 33 11/24/2024
1.5.2-preview.21 38 11/16/2024
1.5.2-preview.20 42 10/31/2024
1.5.2-preview.19 42 10/30/2024
1.5.2-preview.18 41 10/28/2024
1.5.2-preview.17 41 10/28/2024
1.5.2-preview.16 39 10/28/2024
1.5.2-preview.15 51 10/1/2024
1.5.2-preview.14 42 10/1/2024
1.5.2-preview.13 50 9/30/2024
1.5.2-preview.12 47 9/20/2024
1.5.2-preview.11 57 9/13/2024
1.5.2-preview.10 50 9/6/2024
1.5.2-preview.9 46 8/27/2024
1.5.2-preview.8 46 8/27/2024
1.5.2-preview.7 71 8/16/2024
1.5.2-preview.6 49 8/1/2024
1.5.2-preview.5 47 7/23/2024
1.5.2-preview.4 39 7/23/2024
1.5.2-preview.3 63 7/15/2024
1.5.2-preview.2 40 7/5/2024
1.5.2-preview.1 56 6/14/2024
1.5.1 37,242 6/4/2024
1.5.1-preview.1 55 6/4/2024
1.4.1-preview.14 62 5/31/2024
1.4.1-preview.13 58 5/31/2024
1.4.1-preview.12 57 5/21/2024
1.4.1-preview.11 67 5/10/2024
1.4.1-preview.10 45 5/3/2024
1.4.1-preview.9 72 4/15/2024
1.4.1-preview.8 68 4/12/2024
1.4.1-preview.7 66 4/3/2024
1.4.1-preview.6 53 4/3/2024
1.4.1-preview.5 59 3/8/2024
1.4.1-preview.4 65 3/7/2024
1.4.1-preview.3 75 3/4/2024
1.4.1-preview.2 58 3/4/2024
1.4.1-preview.1 79 3/1/2024
1.4.0 72,426 2/29/2024
1.3.2-preview.3 58 2/29/2024
1.3.2-preview.2 67 2/16/2024
1.3.2-preview.1 67 2/15/2024
1.3.1 25,213 2/13/2024
1.3.1-preview.9 60 2/13/2024
1.3.1-preview.8 69 2/6/2024
1.3.1-preview.7 62 2/6/2024
1.3.1-preview.6 65 1/22/2024
1.3.1-preview.5 67 1/12/2024
1.3.1-preview.4 60 1/12/2024
1.3.1-preview.3 54 1/12/2024
1.3.1-preview.2 79 12/18/2023
1.3.1-preview.1 100 11/26/2023
1.3.0 53,751 11/17/2023
1.2.1-preview.5 71 11/17/2023
1.2.1-preview.4 64 11/17/2023
1.2.1-preview.3 70 11/13/2023
1.2.1-preview.2 70 11/7/2023
1.2.0 31,881 10/31/2023
1.1.1 39,946 7/20/2023