AntlPhonenumber.Ecto.PlusE164 (AntlPhonenumber v0.1.9) View Source

An Ecto type for plus_e164 formatted numbers.

It can be used like this:

defmodule Schema do use Ecto.Schema

embedded_schema do

field(:number, PlusE164)
field(:french_number, PlusE164, iso_country_code: "FR")

end end

Link to this section Summary

Functions

Callback implementation for Ecto.ParameterizedType.cast/2.

Callback implementation for Ecto.ParameterizedType.init/1.

Callback implementation for Ecto.ParameterizedType.type/1.

Link to this section Types

Link to this section Functions

Specs

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

Callback implementation for Ecto.ParameterizedType.cast/2.

Specs

dump(t() | nil, fun(), map()) :: {:ok, binary() | nil} | :error

Callback implementation for Ecto.ParameterizedType.dump/3.

Specs

init(keyword()) :: map()

Callback implementation for Ecto.ParameterizedType.init/1.

Specs

load(binary() | nil, fun(), map()) :: {:ok, t() | nil}

Callback implementation for Ecto.ParameterizedType.load/3.

Specs

type(any()) :: :string

Callback implementation for Ecto.ParameterizedType.type/1.