Defines a validation of values of type V
in the context of another type W
, for example
if W
instance wrap values of type V
Pull the low-priority instances into the companion object so they'll be available in the implicit scope.
import ValueClassUrlBinders._
to get both the ValueClassPathBindable
and ValueClassQueryStringBindable
generators in implicit scope.
import ValueClassUrlBinders._
to get both the ValueClassPathBindable
and ValueClassQueryStringBindable
generators in implicit scope. In particular, add this to your build.sbt
to import them into
the routes file:
routesImport += "com.wellfactored.playbinders.ValueClassUrlBinders._"
Defines a validation of values of type
V
in the context of another typeW
, for example ifW
instance wrap values of typeV
So if you have
case class UserId(id: Long)
you might define an implicitValidator[UserId, Long]
that checks that theLong
value is non-negative.The context in which the validation takes place
The type of the values that will be validated