Skip to content

Instantly share code, notes, and snippets.

@jailsonsf
Created March 29, 2023 02:56
Show Gist options
  • Save jailsonsf/f58f55e5ceff75d40941fc338ca439f5 to your computer and use it in GitHub Desktop.
Save jailsonsf/f58f55e5ceff75d40941fc338ca439f5 to your computer and use it in GitHub Desktop.
source 'https://rubygems.org'
gem 'cpf_cnpj', '~> 0.5.0'
require 'cpf_cnpj'
def validate_cpf(cpf)
if CPF.valid?(cpf)
'CPF válido!'
else
'CPF inválido!'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment