mapError<E2> abstract method

ValidationResult<T, E2> mapError<E2>(
  1. E2 transform(
    1. E error
    )
)

Maps the error(s) if invalid, returns same valid result otherwise. Maps the error(s) if invalid, returns same valid result otherwise.

Implementation

ValidationResult<T, E2> mapError<E2>(E2 Function(E error) transform);