isValidNumber method

bool isValidNumber()

Implementation

bool isValidNumber() {
  final Country country = getCountry(completeNumber);
  if (number.length < country.minLength) {
    throw NumberTooShortException();
  }

  if (number.length > country.maxLength) {
    throw NumberTooLongException();
  }
  return true;
}