https://kotlinlang.org logo
#announcements
Title
# announcements
p

paulex

07/25/2019, 12:21 AM
Please does anyone know any good validation library for Kotlin?/
c

Casey Brooks

07/25/2019, 1:39 AM
I’m not sure if this is entirely what you’re looking for, but I’ve written a small library, Trellis, to do something like this. It’s an implementation of the Specification Pattern, and offers a pattern for creating large validation “specifications” out of smaller ones. https://copper-leaf.github.io/trellis/
It doesn’t check all fields of an object if that’s what your’re looking for, but it does make it easy to perform and inspect complex validations on a single object. Here’s an example of its usage: https://copper-leaf.github.io/trellis/wiki/examples/boolean-logic/
p

paulex

07/25/2019, 1:57 AM
Let me check it out...
m

Marko Mitic

07/25/2019, 8:17 AM
p

paulex

07/25/2019, 3:40 PM
@Marko Mitic It is stressful to use without Reflection...
5 Views