Validation 2.6.68

Validation

Method input validation and runtime checks that report errors or throw exceptions when failures are detected.

Check out our full documentation.

Basic input validation via the Requires class throws an ArgumentException.

Requires.NotNull(arg1);
Requires.NotNullOrEmpty(arg2);

State validation via the Verify class throws an InvalidOperationException.

Verify.Operation(condition, "some error occurred.");

Internal integrity checks via the Assumes class throws an InternalErrorException.

Assumes.True(condition, "some error");

Warning signs that should not throw exceptions via the Report class.

Report.IfNot(condition, "some error");

No packages depend on Validation.

.NET Framework 3.5

  • No dependencies.

.NET Framework 4.6.2

  • No dependencies.

.NET 8.0

  • No dependencies.

.NET 9.0

  • No dependencies.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
2.6.68 1 01/18/2025
2.6.65-rc.2 0 12/20/2024
2.6.55-rc.1 0 12/20/2024
2.6.13-beta 0 12/25/2021
2.6.7-beta 0 10/01/2021
2.5.51 0 12/29/2021
2.5.42 0 07/05/2021
2.5.5-beta 0 09/25/2020
2.4.22 0 03/26/2019
2.4.18 0 10/31/2017
2.4.17 0 10/29/2017
2.4.15 0 03/15/2017
2.4.15-g8377954d86 0 03/15/2017
2.4.13 0 03/05/2017
2.4.10 0 02/25/2017
2.4.9 0 02/21/2017
2.4.7 0 02/17/2017
2.3.7 0 08/14/2016
2.3.5 0 07/30/2016
2.2.8 0 10/10/2015
2.2.5 0 10/08/2015
2.2.4 0 10/06/2015
2.0.6.15003 0 01/04/2015
2.0.5.14286 0 10/14/2014
2.0.4.14103 0 04/14/2014
2.0.3.13323 0 11/19/2013
2.0.2.13022 0 01/22/2013
2.0.1.12362 0 12/27/2012
2.0.0.12319 0 11/15/2012
1.0.0.12259 0 09/15/2012