An international phone field — country picker + national number input that
writes a canonical E.164 value (e.g. "+15555550100") into a hidden input
for phx-change/phx-submit.
<.phone field={@form[:phone]} label="Phone" />
<.phone field={@form[:phone]} country="GB" required />Pairs with the Skua.Phone harness: validate with
Skua.Phone.validate_phone(changeset, :phone, required: true). The country
dataset is rendered alongside the field (no extra dependency, no bloat to the
shared JS bundle), so the picker is fully self-contained in the SkuaPhone
hook.
Summary
Functions
Attributes
field(Phoenix.HTML.FormField) - Defaults tonil.id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:any) - Defaults tonil.country(:string) - default ISO-3166 alpha-2 country. Defaults to"US".label(:string) - Defaults tonil.hint(:string) - Defaults tonil.errors(:list) - Defaults tonil.required(:boolean) - Defaults tofalse.placeholder(:string) - Defaults to"Phone number".- Global attributes are accepted.