CPF v0.2.0 CPF View Source
CPF mobulde provides functions to verify if a CPF is valid.
Link to this section Summary
Functions
Returns true
the given cpf
is valid, otherwise false
.
Link to this section Types
A custom CPF type that can be a number or string
Link to this section Functions
Link to this function
valid?(cpf) View Source
Returns true
the given cpf
is valid, otherwise false
.
Examples
iex> CPF.valid?(563_606_676_73)
true
iex> CPF.valid?(563_606_676_72)
false
iex> CPF.valid?("563.606.676-73")
true
iex> CPF.valid?("563/60.6-676/73")
false
iex> CPF.valid?("563.606.676-72")
false
iex> CPF.valid?("56360667673")
true
iex> CPF.valid?("56360667672")
false