Classes: Cpf
5 6 7 8 9 10
# File 'app/validators/eac_rails_utils/cpf_validator.rb', line 5 def validate_each(record, attribute, value) return if Cpf.new(value).valid? record.errors[attribute] << (options[:message] || 'CPF inválido (9 caracteres, somente dígitos)') end