Sha256: a95282fa99e88b68885a869d9096b0decd938e074ee08f6f29498ff3f638dccb
Contents?: true
Size: 202 Bytes
Versions: 48
Compression:
Stored size: 202 Bytes
Contents
class CnpjValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return if value.nil? record.errors.add attribute, :invalid unless Cnpj.new(value).valido? end end
Version data entries
48 entries across 48 versions & 2 rubygems