williamgueiros / Brcpfcnpj

Validação,Formatação e Gerador Cpf/Cnpj em Elixir
MIT License
69 stars 17 forks source link

cpf_valid error - nil #9

Closed eriknakata closed 5 years ago

eriknakata commented 6 years ago

Guys,

I had an issue with the function cnpj_valid? when the input is "nil".

Example:

Brcpfcnpj.cpf_valid?(%Cpf{number: nil})

Result:

** (FunctionClauseError) no function clause matching in Regex.replace/4

I think would be great is the function returns "false" with nil cases.

Can I send a pull request with the fix?

williamgueiros commented 6 years ago

hello

tomorrow, i will creta new release to you

williamgueiros commented 6 years ago

sorry delay

williamgueiros commented 5 years ago

fix in version 0.1.1