io.github.soleworks, released together and always at the
same version:
Most projects need only
validity-core.
Add the dependency
validity-phone too, at the same version:
Requirements
Java 17+
The JVM the artifacts are compiled for.
Kotlin 2.4
The version Validity is built with. It uses context parameters for its DSL.
Coroutines
kotlinx.coroutines comes with
validity-core. You do not need to add it.Imports
The DSL lives inio.github.soleworks.validity, and the constraints in io.github.soleworks.validity.constraints.
The constraints of a country have a package of their own, and the phone constraints live in the phone module:
Versions
Validity follows Semantic Versioning. While the version is0.x, a breaking change raises the
minor version, so moving to the next minor version may ask you to change your code. The
changelog says what to change.
Next: validate your first class
Declare the rules of a class and read its violations.