Interface PhoneNormalizer

All Known Implementing Classes:
LibPhoneNumberNormalizer

public interface PhoneNormalizer
Port that turns the phone number a user typed into E.164.
  • Method Details

    • normalize

      Optional<PhoneNumber> normalize(String input, String defaultRegion)
      Normalizes a number.
      Parameters:
      input - what the user typed, possibly with spaces or punctuation.
      defaultRegion - ISO 3166-1 alpha-2 code of the region assumed when the input has no country prefix.
      Returns:
      the number, or empty when the input is not a valid phone number.