CPF v1.1.0 CPF.Ecto.Type View Source
Provide you functions to use the CPF type in your Ecto schema fields.
Usage
defmodule MyApp.MySchema do
use Ecto.Schema
# Import the cpf_type/1 helper
import CPF.Ecto.Type
schema "my_schemas" do
# use the helpers functions in any field
field :cpf, cpf_type(:string)
end
end
Link to this section Summary
Functions
A parameterized type
macro function.
Link to this section Functions
A parameterized type
macro function.
cpf_type(:bigint)
is a alias forCPF.Ecto.Type.Bigint
cpf_type(:string)
is a alias forCPF.Ecto.Type.String