KVerify: A Two-Year Journey to Get Validation Right
KVerify: A Two-Year Journey to Get Validation Right In December 2023, I wrote a small article about a utility I called ValidationBuilder. The idea was simple: a DSL where you'd call validation rule...

Source: DEV Community
KVerify: A Two-Year Journey to Get Validation Right In December 2023, I wrote a small article about a utility I called ValidationBuilder. The idea was simple: a DSL where you'd call validation rules as extension functions on property references, collect all violations in one pass, and get a result back. Ktor-specific, but the concept was portable. I published it and moved on. Except I didn't. The Problem I came to Kotlin without a Java background. Spring was my first serious framework, and I didn't really understand it. My issue was specific: I was reaching for Kotlin object declarations where Spring wanted managed beans. I was hardcoding configuration values that should have been injected, not because I didn't know configuration existed, but because I couldn't figure out how to bridge Spring's dependency injection with Kotlin's object. I was working around my own knowledge gaps without realizing that's what I was doing. Everything ran, so I assumed everything was fine. Eventually I mo