EctoPhoneNumber (EctoPhoneNumber v0.4.0-git-dfb0) View Source

Phone number type with validation and formatting for Ecto.

Link to this section Summary

Link to this section Types

Specs

t() :: %EctoPhoneNumber{e164: term()}

Link to this section Functions

Specs

cast(any()) :: {:ok, t() | nil} | :error

Callback implementation for Ecto.Type.cast/1.

Specs

dump(any()) :: :error | {:ok, binary()}

Callback implementation for Ecto.Type.dump/1.

Specs

embed_as(any()) :: :self

Specs

equal?(any(), any()) :: boolean()
Link to this function

format(ecto_phone_number, format \\ :international)

View Source

Specs

format(t() | nil, atom()) :: binary()

Specs

load(binary()) :: :error | {:ok, t()}

Callback implementation for Ecto.Type.load/1.

Specs

type() :: :string

Callback implementation for Ecto.Type.type/0.