Skip to content

How to use the value from one validation in another validation #1136

Answered by louthy
speterson-zoll asked this question in Q&A
Discussion options

You must be logged in to vote

Just put them in a LINQ expression:

Validation<Error, string> GetConfig(string key) => …

var res = from v in GetConfig(“key1”)
          from v2 in GetConfig(v)
          select v2;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@speterson-zoll
Comment options

Answer selected by speterson-zoll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants