Sha256: 0437464686d61c52a2693305cedca24147fecd34f86e8b6c65564ed23d7151c0
Contents?: true
Size: 384 Bytes
Versions: 1
Compression:
Stored size: 384 Bytes
Contents
module Einvoice module Validator module Neweb class CustomsClearanceMarkValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if record.tax_rate.present? && record.tax_rate.to_i.zero? && value.blank? record.errors.add attribute, options[:message] || :invalid end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
einvoice-0.2.0 | lib/einvoice/neweb/validator/customs_clearance_mark_validator.rb |