Skip to content

code-dispenser/Flow-Validated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.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

About

Extensions for converting between a Validated<T> and Flow<T>

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages