Sha256: 7bdedbbffcd1a1f9475cccd4e09dac85e1c44960e19c182ce7a99bb70b68ed3b
Contents?: true
Size: 246 Bytes
Versions: 18
Compression:
Stored size: 246 Bytes
Contents
class CpfValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if value.present? cpf = BrDocuments::CnpjCpf::Cpf.new(value) record.errors.add(attribute, :invalid) if not cpf.valid? end end end
Version data entries
18 entries across 18 versions & 1 rubygems