1 package io.taig.circe
2
3 import cats.data.ValidatedNel
4 import io.circe.{Decoder, ValidatingDecoder}
5
6 package object validation {
7 implicit final class RichValidationDecoder[A](val decoder: Decoder[A]) extends AnyVal {
8 def verify[B](validate: A => ValidatedNel[String, B]): ValidatingDecoder[B] =
9 ValidatingDecoder.lift(decoder)(validate)
10 }
11 }
Line |
Stmt Id |
Pos |
Tree |
Symbol |
Code |
9
|
13
|
305
-
346
|
Apply
|
io.circe.ValidatingDecoder.lift
|
io.circe.ValidatingDecoder.lift[A, B](RichValidationDecoder.this.decoder)(validate)
|