Hi, I am looking at the second validation example ...
# arrow
d
Hi, I am looking at the second validation example in the tutorial (https://arrow-kt.io/docs/patterns/error_handling/#alternative-validation-strategies--failing-fast-vs-accumulating-errors) and I have a use case that is slightly different. The function
private
*fun* FormField.*validateErrorAccumulate*(): ValidatedNel<ValidationError, Email>
either has a list of ValidationError, or Email objects. But I'd like to have both. Because I'd then like to further validate on the correct e-mails (e.g. checking they are in a certain domain). Is there any datatype available for this, or can Arrow not really help with this problem? In short my pipeline is: 1. raw data entries 2. each entry is either incorrect (error), or it is transformed to a processed entry. (so you'd end up with 2 lists) 3. do some other validations on each processed entry. 4. report all errors (both on processed and unprocessed entries)