@Jilles van Gurp Unfortunately, my library currently involves a small annotation processor, which is required to make the syntax way more readable. However, we could imagine a way for the user to disable the processor and fall back on an API a bit more verbose.
Currently, if you have the following models:
data class Book(val author: Author)
data class Author(val name: String)
With the KSP processor you can do:
Validator<Book> {
author.name.length {
between(2, 50)
}
}
Without it we could imagine a fallback on a Konform-ish syntax:
Validator<Book> {
Book::author + Author::name + String::length {
between(2, 50)
}
}