validateLength static method

void validateLength(
  1. String addr,
  2. int lenExp
)

Validate address length.

Implementation

static void validateLength(String addr, int lenExp) {
  if (addr.length != lenExp) {
    throw AddressConverterException.addressValidationFailed(
      reason: "Invalid address length.",
    );
  }
}