Valkyrie 5.0.2

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

Valkyrie

.NET Publish

Valkyrie is a simple set of data annotations and extension methods to help with validating your objects in .NET.

Basic Usage

For the most part, Valkyrie consists of DataAnnotations. To use Valkyrie, simply add the annotations to your properties as shown below:

public class MyClass
{
    [Cascade]
    public MyOtherClass ItemA { get; set; }
	
    [Between("1/1/1900", "1/1/2100")]
    public DateTime ItemB { get; set; }
	
    [Contains("A")]
    public List<string> ItemC { get; set; }
}

The System.ComponentModel.DataAnnotations.Validator class will automatically pick up these annotations when validating your object. Additionally, there are a couple of extension methods added to simplify object validation:

var results = new List<ValidationResult>();
bool didItWork = MyObject.TryValidate(results);

And:

MyObject.Validate();

The TryValidate method returns a list of validation results, while the Validate method throws a ValidationException if there are any issues with validating your object.

Installation

The library is available on NuGet with the package name "Valkyrie." To install it, run the following command in the Package Manager Console:

Install-Package Valkyrie

Build Process

To build the library, make sure you have the following minimum requirements:

  • Visual Studio 2022

Simply clone the project and load the solution in Visual Studio. You should be able to build it without much effort.

Contributing

We welcome contributions to Valkyrie. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. We appreciate your support!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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 Valkyrie:

Package Downloads
Inflatable

Inflatable is a simple ORM.

Monarch

Monarch is a command line parser/command runner

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.2 219 7/15/2025
5.0.1 457 6/27/2025
5.0.0 2,904 11/22/2024
4.0.102 274 11/12/2024
4.0.101 213 11/11/2024
4.0.100 287 11/5/2024
4.0.99 346 10/30/2024
4.0.98 192 10/30/2024
4.0.97 155 10/29/2024
4.0.96 364 10/10/2024
4.0.95 202 10/9/2024
4.0.94 1,235 8/28/2024
4.0.93 256 8/26/2024
4.0.92 260 8/23/2024
4.0.91 321 8/21/2024
4.0.90 476 8/19/2024
4.0.89 293 8/15/2024
4.0.88 313 8/3/2024
4.0.87 339 7/24/2024
4.0.86 320 7/10/2024
4.0.85 495 6/26/2024
4.0.84 240 6/25/2024
4.0.83 421 6/18/2024
4.0.82 249 6/17/2024
4.0.81 346 6/13/2024
4.0.80 241 6/12/2024
4.0.79 343 5/30/2024
4.0.78 623 5/29/2024
4.0.77 351 5/16/2024
4.0.76 232 5/15/2024
4.0.75 335 5/7/2024
4.0.74 274 5/6/2024
4.0.73 324 5/2/2024
4.0.72 411 5/1/2024
4.0.71 231 4/30/2024
4.0.70 316 4/29/2024
4.0.69 558 4/11/2024
4.0.68 296 4/10/2024
4.0.67 411 3/30/2024
4.0.66 344 3/28/2024
4.0.65 448 3/15/2024
4.0.64 263 3/14/2024
4.0.63 275 3/13/2024
4.0.62 372 3/8/2024
4.0.61 316 3/7/2024
4.0.60 238 3/6/2024
4.0.59 242 3/5/2024
4.0.58 230 3/4/2024
4.0.57 590 2/28/2024
4.0.56 230 2/28/2024
4.0.55 279 2/23/2024
4.0.54 247 2/22/2024
4.0.53 243 2/21/2024
4.0.52 210 2/20/2024
4.0.51 706 2/14/2024
4.0.50 400 2/9/2024
4.0.49 276 2/7/2024
4.0.48 244 2/6/2024
4.0.47 227 2/5/2024
4.0.46 516 1/31/2024
4.0.45 514 1/23/2024
4.0.44 204 1/22/2024
4.0.43 624 1/10/2024
4.0.42 979 12/18/2023
4.0.41 350 12/13/2023
4.0.40 356 12/12/2023
4.0.39 647 11/23/2023
4.0.38 320 11/20/2023
4.0.37 756 11/17/2023
4.0.36 727 11/16/2023
4.0.35 267 11/16/2023
4.0.34 484 11/8/2023
4.0.33 293 11/6/2023
4.0.32 261 11/3/2023
4.0.31 420 10/31/2023
4.0.30 251 10/30/2023
4.0.29 263 10/27/2023
4.0.28 340 10/25/2023
4.0.27 496 10/11/2023
4.0.26 471 9/25/2023
4.0.25 312 9/19/2023
4.0.24 269 9/19/2023
4.0.23 451 9/13/2023
4.0.22 280 9/12/2023
4.0.21 308 9/11/2023
4.0.20 264 9/11/2023
4.0.19 474 9/7/2023
4.0.18 307 9/5/2023
4.0.17 271 9/4/2023
4.0.16 331 9/1/2023
4.0.15 302 8/31/2023
4.0.14 298 8/30/2023
4.0.13 314 8/29/2023
4.0.12 310 8/28/2023
4.0.11 569 8/22/2023
4.0.10 371 8/17/2023
4.0.9 626 8/8/2023
4.0.8 274 8/8/2023
4.0.7 347 8/7/2023
4.0.6 377 8/4/2023
4.0.5 671 7/25/2023
4.0.4 643 7/13/2023
4.0.3 213 7/13/2023
4.0.2 195 7/13/2023
4.0.1 849 12/13/2022
4.0.0 541 12/12/2022
3.0.10 1,735 6/10/2022
3.0.7 2,359 1/11/2022
3.0.6 2,565 6/16/2021
3.0.5 1,024 6/16/2021
3.0.4 1,339 1/6/2021
3.0.2 3,418 9/13/2020
3.0.1 8,650 3/25/2020
3.0.0 7,106 12/23/2019
2.0.5 1,875 2/21/2019
2.0.4 3,962 8/10/2018
2.0.3 964 8/10/2018
2.0.2 3,394 6/1/2018
2.0.1 1,759 5/22/2018
2.0.0 4,421 1/2/2018
1.0.6 14,237 5/17/2017
1.0.4 1,302 3/22/2017
1.0.2 1,249 1/26/2017
1.0.1 1,205 1/25/2017