Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.71 KB

File metadata and controls

29 lines (20 loc) · 1.71 KB

.NET Coverage Status

flow icon Flow.Validated

Overview

This library provides simple extension methods for converting Validated results into Flow results, making it easier to integrate validation outcomes with flow returns.

Getting started

Add the Flow.Validated nuget package to your project using Nuget Package Manager or the dotnet CLI:

dotnet add package Flow.Validated

Add the using statement using Validated.Core.Extensions. to access the ToFlow<T> extension.

Usage

Currently there is a single ToFlow<T> extension method with an async overload that attaches to a Validated<T> returning a Flow<T>

If the Validated<T> is invalid it creates a failed Flow<T> using the Failure.InvalidEntryFailure type, copying the list of InvalidEntry into the failure. Note: If any of the invalid entries have a Cause that is not set to Validation, such as SystemError or RuleConfigError then the CanRetry property is set to false otherwise it is set to true