Sums up values inside validation, if both are success or failure.
Sums up values inside validation, if both are success or failure. Returns first failure otherwise.
success(v1) +++ success(v2) → success(v1 + v2) success(v1) +++ failure(v2) → failure(v2) failure(v1) +++ success(v2) → failure(v1) failure(v1) +++ failure(v2) → failure(v1 + v2)
If this
and that
are both success, or both a failure, combine them with the provided Semigroup
for each.
If this
and that
are both success, or both a failure, combine them with the provided Semigroup
for each. Otherwise, return the success. Alias for append
If this validation is success, return the given X value, otherwise, return the X value given to the return value.
If this validation is success, return the given X value, otherwise, return the X value given to the return value.
Compare two validations values for equality.
Compare two validations values for equality.
Run a disjunction function and back to validation again.
Run a disjunction function and back to validation again. Alias for disjunctioned
Apply a function in the environment of the success of this validation, accumulating errors.
Apply a function in the environment of the success of this validation, accumulating errors.
If this
and that
are both success, or both a failure, combine them with the provided Semigroup
for each.
If this
and that
are both success, or both a failure, combine them with the provided Semigroup
for each. Otherwise, return the success. Alias for +|+
Binary functor map on this validation.
Binary functor map on this validation.
Binary functor traverse on this validation.
Binary functor traverse on this validation.
Compare two validations values for ordering.
Compare two validations values for ordering.
Convert to a disjunction.
Convert to a disjunction.
Run a disjunction function and back to validation again.
Run a disjunction function and back to validation again. Alias for @\/
Ensures that the success value of this validation satisfies the given predicate, or fails with the given value.
Ensures that the success value of this validation satisfies the given predicate, or fails with the given value.
Return a Validation formed by the application of a partial function across the success of this value:
Return a Validation formed by the application of a partial function across the success of this value:
strings map (_.parseInt excepting { case i if i < 0 => new Exception(s"Int must be positive: $i") })
7.0.2
Return true
if this validation is a success value satisfying the given predicate.
Return true
if this validation is a success value satisfying the given predicate.
Filter on the success of this validation.
Filter on the success of this validation.
If this
is a success, return it; otherwise, if that
is a success, return it; otherwise, combine the failures with the specified semigroup.
If this
is a success, return it; otherwise, if that
is a success, return it; otherwise, combine the failures with the specified semigroup.
Catamorphism.
Catamorphism. Run the first given function if failure, otherwise, the second given function.
Fold on the success of this validation.
Fold on the success of this validation.
Return true
if this validation is a failure value or the success value satisfies the given predicate.
Return true
if this validation is a failure value or the success value satisfies the given predicate.
Run the side-effect on the success of this validation.
Run the side-effect on the success of this validation.
Return the success value of this validation or the given default if failure.
Return the success value of this validation or the given default if failure. Alias for |
Return true
if this validation is failure.
Return true
if this validation is failure.
Return true
if this validation is success.
Return true
if this validation is success.
Run the given function on the left value.
Run the given function on the left value.
Spin in tail-position on the failure value of this validation.
Spin in tail-position on the failure value of this validation.
Spin in tail-position on the success value of this validation.
Spin in tail-position on the success value of this validation.
Map on the success of this validation.
Map on the success of this validation.
Return this if it is a success, otherwise, return the given value.
Return this if it is a success, otherwise, return the given value. Alias for |||
Show for a validation value.
Show for a validation value.
Flip the failure/success values in this validation.
Flip the failure/success values in this validation. Alias for unary_~
Run the given function on this swapped value.
Run the given function on this swapped value. Alias for ~
Convert to a core scala.Either
at your own peril.
Convert to a core scala.Either
at your own peril.
Return an empty list or list with one element on the success of this validation.
Return an empty list or list with one element on the success of this validation.
Return an empty maybe or maybe with the element on the success of this validation.
Return an empty maybe or maybe with the element on the success of this validation. Useful to sweep errors under the carpet.
Return an empty option or option with one element on the success of this validation.
Return an empty option or option with one element on the success of this validation. Useful to sweep errors under the carpet.
Return an empty stream or stream with one element on the success of this validation.
Return an empty stream or stream with one element on the success of this validation.
Wraps the failure value in a scalaz.NonEmptyList
Wraps the failure value in a scalaz.NonEmptyList
Traverse on the success of this validation.
Traverse on the success of this validation.
Flip the failure/success values in this validation.
Flip the failure/success values in this validation. Alias for swap
Return the success value of this validation or run the given function on the failure.
Return the success value of this validation or run the given function on the failure.
Return the success value of this validation or the given default if failure.
Return the success value of this validation or the given default if failure. Alias for getOrElse
Return this if it is a success, otherwise, return the given value.
Return this if it is a success, otherwise, return the given value. Alias for orElse
Run the given function on this swapped value.
Run the given function on this swapped value. Alias for swapped