v2.0 Migration guide
Version 2.x breaks back compatibility with the 1.x version. The migration has been tested on production code making heavy use of validation for json (based on play-json) and xml. Even for big projects, migrating to 2.x should not take more than 30 min.
The best method is just to update validation in your dependencies, and let the compiler figure out what's broken. The following changes list should cover everything needed.
The project name for play-json based validation has changed.
"io.github.jto" %% "validation-json" % validationVersion
"io.github.jto" %% "validation-playjson" % validationVersion
- Since the library does not depend on Play anymore and is not planned to be integrated into Play, the package names have changed. Basically
jto.validation. A simple search and replace in your project should work.
- The validation api support several json representations. Therefore, the package name for play json changes.
Write were renamed to better match the naming convention in all subprojects.
If you encounter implicit resolution problem, you probably have a name clash. Make sure none of your
Write uses those names.
Since validation does not uses play-functional anymore,
unlift should be imported directly as
scala.Function.unlift instead of
Since we removed all the dependencies on Play,
play.api.mapping.ValidationError is re-defined in validation. If you're using this class, make sure to replace it by