Sha256: f4e8036f7e103c02033677387b79bc49e79473bd67c6a1822bef8d0fcf6ec7f0
Contents?: true
Size: 235 Bytes
Versions: 6
Compression:
Stored size: 235 Bytes
Contents
class GtinValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return if value.blank? gtin = BrDocuments::Gtin.new(value) record.errors.add(attribute, :invalid) unless gtin.valid? end end
Version data entries
6 entries across 6 versions & 1 rubygems