Phone Number Type
What kind of line a phone number is, as classified by libphonenumber's per-region metadata.
Most flows that collect a phone number actually want a subset of these. An SMS one-time-code flow needs a number that can receive SMS, which means Mobile; a landline, a pager or a premium line will pass plain validity and then silently never receive the code. Restricting the accepted types moves that failure from "the user never gets their code" to "the field says so while they are still on the screen".
Pass a set of these as allowedNumberTypes to the phone field or to com.ezzy.ccp.countrypicker.phone.PhoneNumberValidator.evaluate. An empty set — the default — accepts any type, which is the right behaviour when the number is only being stored.
See also
for the case that makes naive type matching wrong.
Entries
The region's numbering plan does not separate landline from mobile, so the number is one of the two and libphonenumber cannot say which.
Premium-rate, charged above the standard rate.
Shared-cost, billed partly to the caller.
A personal number that redirects to a chosen line.
Properties
Functions
Whether this actual type satisfies a requirement for required.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.