validate method

Either<NetworkAddressError, String> validate(
  1. String input
)

Validates the given input string as a network address.

Implementation

Either<NetworkAddressError, String> validate(String input) {
  return v.NetworkValidator(config)
      .validate(input)
      .fold((issue) => Left(issue.toNetworkAddressError()), Right.new);
}