BrazilianDocuments.Changeset (Brazilian Documents v0.4.1) View Source
Ecto changeset integration.
Link to this section Summary
Link to this section Functions
Specs
validate_cnpj( changeset :: Ecto.Changeset.t(), field :: atom(), opts :: Keyword.t() ) :: Ecto.Changeset.t()
Validates a change is a valid CNPJ.
Options
:message
- the message on failure, defaults to "has invalid cnpj"
Examples
validate_cnpj(changeset, :cnpj)
Specs
validate_cpf( changeset :: Ecto.Changeset.t(), field :: atom(), opts :: Keyword.t() ) :: Ecto.Changeset.t()
Validates a change is a valid CPF.
Options
:message
- the message on failure, defaults to "has invalid cpf"
Examples
validate_cpf(changeset, :cpf)