- Overview
- Quick Start
- Introduction
- Guides
- Client Libraries
- API Reference
- Examples
- DDD Resources
- Validation user guide
- Validation developer guide
Getting started
This section helps you set up Spine Validation, define your first validated Protobuf model, and see validation in action in Java and Kotlin.
If you are new to the library, read the short overview first:
- Introduction → Overview
- Who this is for → Target audience
- Design principles → Philosophy
What you’ll learn
- How to add Spine Validation to a JVM project using Gradle plugins.
- How to declare validation rules in
.protofiles. - How validation is enforced at runtime.
Prerequisites
- Java 17+
- Gradle (Kotlin DSL or Groovy)
- Optional: Kotlin 2.2.21+ for the Kotlin Protobuf DSL
If your project already generates Java/Kotlin sources from .proto files, you’re 90% there.
Spine Validation integrates into the build to generate and inject validation logic into
the code produced by protoc.
Code samples in this tutorial use Google Truth and Kotest Assertions.
Quick path
- Add Validation to your build
- Define constraints in
.protofiles - Build your project
- Use the generated validation API