Hi there. I’m using `ValidatedNel` to validate and...
# arrow
Hi there. I’m using
to validate and accumulate potential errors when converting objects from one domain to another. Thing is that these objects (deserialized from rest endpoints) have like 20+ fields, which requires me to write custom large
extensions, since the library provides arity only up to 10. This is not only inconvenient, but also simply smelly. Is there any better way (or some kind of best practice) to perform validations/conversions on such large number of parameters?
Hey @Jakub Gwóźdź, Sadly there is no way to conveniently defining so much parameters in Kotlin 😞 You can easily compose multiple
with each other using
. Here is a Slack thread that explains the solution, hope that helps ☺️ https://kotlinlang.slack.com/archives/C5UPMM0A0/p1663913017330369