Created
March 29, 2023 02:56
-
-
Save jailsonsf/f58f55e5ceff75d40941fc338ca439f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'cpf_cnpj', '~> 0.5.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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