What is this?
This is zero-dependency Scala(2.12/2.13/3) validation library
- Abstracted over ValidationResult type
- Rich predefined validation dsl that can be extended
- Custom error type
- Supports accumulate and fail-fast validation out of the box
- Can be used for Effectful validation
Install
To start using this library add this build.sbt
:
// resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies += "company.jap" %% "validation-core" % V.validation
Concept
Core concept of this validation library is defining Field
's that store its path and value. Then you can create your ValidationModule choosing ValidationResult type and your Error type that will provide you with validation syntax. Predefined ValidationResult are Accumulate and FailFast(built on top of Either)